File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -45,20 +45,19 @@ public function __construct(HttpKernelInterface $app, array $options = array())
45
45
46
46
public function handle (Request $ request , $ type = HttpKernelInterface::MASTER_REQUEST , $ catch = true )
47
47
{
48
- if ($ request ->getMethod () === 'OPTIONS ' ) {
49
- if ($ this ->cors ->isPreflightRequest ($ request )) {
50
- $ response = $ this ->cors ->handlePreflightRequest ($ request );
51
- } else {
52
- $ response = $ this ->app ->handle ($ request , $ type , $ catch );
53
- }
54
-
48
+ if ($ this ->cors ->isPreflightRequest ($ request )) {
49
+ $ response = $ this ->cors ->handlePreflightRequest ($ request );
55
50
$ this ->cors ->varyHeader ($ response , 'Access-Control-Request-Method ' );
56
51
57
52
return $ response ;
58
53
}
59
54
60
55
$ response = $ this ->app ->handle ($ request , $ type , $ catch );
61
56
57
+ if ($ request ->getMethod () === 'OPTIONS ' ) {
58
+ $ this ->cors ->varyHeader ($ response , 'Access-Control-Request-Method ' );
59
+ }
60
+
62
61
return $ this ->cors ->addActualRequestHeaders ($ response , $ request );
63
62
}
64
63
}
You can’t perform that action at this time.
0 commit comments