Commit 9dd0a21f authored by Pasvaz's avatar Pasvaz

Implemented OPTIONS verb

Laravel crashes when an OPTIONS request is issued
parent 63bf89ef
...@@ -33,6 +33,7 @@ class Router { ...@@ -33,6 +33,7 @@ class Router {
'DELETE' => array(), 'DELETE' => array(),
'PATCH' => array(), 'PATCH' => array(),
'HEAD' => array(), 'HEAD' => array(),
'OPTIONS'=> array(),
); );
/** /**
...@@ -47,6 +48,7 @@ class Router { ...@@ -47,6 +48,7 @@ class Router {
'DELETE' => array(), 'DELETE' => array(),
'PATCH' => array(), 'PATCH' => array(),
'HEAD' => array(), 'HEAD' => array(),
'OPTIONS'=> array(),
); );
/** /**
...@@ -97,7 +99,7 @@ class Router { ...@@ -97,7 +99,7 @@ class Router {
* *
* @var array * @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. * Register a HTTPS route with the router.
...@@ -594,4 +596,4 @@ class Router { ...@@ -594,4 +596,4 @@ class Router {
return implode('/', array_fill(0, $times, $pattern)); return implode('/', array_fill(0, $times, $pattern));
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment