File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 3
3
# Taken from https://symfony.com/doc/current/setup/web_server_configuration.html#nginx
4
4
5
5
location / {
6
- # try to serve file directly, fallback to index.php
7
- try_files $uri /index.php$is_args$args;
6
+
7
+ if ($request_method = 'OPTIONS') {
8
+ include /usr/local/turbolab.it/webstackup/config/nginx/cors.conf;
9
+ return 204;
10
+ }
11
+
12
+ # try to serve file directly, fallback to index.php
13
+ try_files $uri /index.php$is_args$args;
8
14
}
9
15
10
16
## WebDebugToolbar stylesheet (dev only)
@@ -20,6 +26,12 @@ location ^~ /_wdt/ {
20
26
# }
21
27
22
28
location ~ ^/(index|autodeploy|autodeploy-async|async-runner-request)\.php(/|$) {
29
+
30
+ if ($request_method = 'OPTIONS') {
31
+ include /usr/local/turbolab.it/webstackup/config/nginx/cors.conf;
32
+ return 204;
33
+ }
34
+
23
35
fastcgi_pass unix:/run/php/php$PHP_VER-fpm.sock;
24
36
fastcgi_split_path_info ^(.+\.php)(/.*)$;
25
37
include fastcgi_params;
You can’t perform that action at this time.
0 commit comments