Huan He commited on
Commit
10797e8
1 Parent(s): 733c3a6

fix CORS for dev

Browse files
Files changed (1) hide show
  1. conf/dev/default.conf +2 -2
conf/dev/default.conf CHANGED
@@ -20,7 +20,7 @@ server {
20
  index index.html index.htm;
21
 
22
  # Enable CORS for specific origin and allow credentials
23
- add_header 'Access-Control-Allow-Origin' 'http://localhost:5273' always;
24
  add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PUT, DELETE';
25
  add_header 'Access-Control-Allow-Headers' 'Origin, X-Requested-With, Content-Type, Accept, Authorization';
26
  add_header 'Access-Control-Allow-Credentials' 'true' always;
@@ -28,7 +28,7 @@ server {
28
 
29
  # Handle preflight requests
30
  if ($request_method = OPTIONS) {
31
- add_header 'Access-Control-Allow-Origin' 'http://localhost:5273';
32
  add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PUT, DELETE';
33
  add_header 'Access-Control-Allow-Headers' 'Origin, X-Requested-With, Content-Type, Accept, Authorization';
34
  add_header 'Access-Control-Allow-Credentials' 'true';
 
20
  index index.html index.htm;
21
 
22
  # Enable CORS for specific origin and allow credentials
23
+ add_header 'Access-Control-Allow-Origin' '*' always;
24
  add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PUT, DELETE';
25
  add_header 'Access-Control-Allow-Headers' 'Origin, X-Requested-With, Content-Type, Accept, Authorization';
26
  add_header 'Access-Control-Allow-Credentials' 'true' always;
 
28
 
29
  # Handle preflight requests
30
  if ($request_method = OPTIONS) {
31
+ add_header 'Access-Control-Allow-Origin' '*';
32
  add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PUT, DELETE';
33
  add_header 'Access-Control-Allow-Headers' 'Origin, X-Requested-With, Content-Type, Accept, Authorization';
34
  add_header 'Access-Control-Allow-Credentials' 'true';