Implemented OPTIONS verb
Laravel crashes when an OPTIONS request is issued
This commit is contained in:
parent
63bf89efd5
commit
9dd0a21f8d
|
@ -33,6 +33,7 @@ class Router {
|
|||
'DELETE' => array(),
|
||||
'PATCH' => array(),
|
||||
'HEAD' => array(),
|
||||
'OPTIONS'=> array(),
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -47,6 +48,7 @@ class Router {
|
|||
'DELETE' => array(),
|
||||
'PATCH' => array(),
|
||||
'HEAD' => array(),
|
||||
'OPTIONS'=> array(),
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -97,7 +99,7 @@ class Router {
|
|||
*
|
||||
* @var array
|
||||
*/
|
||||
public static $methods = array('GET', 'POST', 'PUT', 'DELETE', 'HEAD');
|
||||
public static $methods = array('GET', 'POST', 'PUT', 'DELETE', 'HEAD', 'OPTIONS');
|
||||
|
||||
/**
|
||||
* Register a HTTPS route with the router.
|
||||
|
@ -594,4 +596,4 @@ protected static function repeat($pattern, $times)
|
|||
return implode('/', array_fill(0, $times, $pattern));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue