@@ -40,29 +40,38 @@ jobs:
4040 listen [::]:80;
4141 server_name api-loa-life.duckdns.org;
4242
43- location / {
44- proxy_pass http://localhost:3001;
45- proxy_http_version 1.1;
46- proxy_set_header Upgrade $http_upgrade;
47- proxy_set_header Connection 'upgrade';
48- proxy_set_header Host $host;
49- proxy_cache_bypass $http_upgrade;
50-
51- add_header 'Access-Control-Allow-Origin' 'https://loa-life.vercel.app' always;
52- add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
53- add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization' always;
54- add_header 'Access-Control-Allow-Credentials' 'true' always;
43+ add_header 'Access-Control-Allow-Origin' 'https://loa-life.vercel.app' always;
44+ add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
45+ add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization,Apollo-Require-Preflight,x-apollo-operation-name,apollo-require-preflight' always;
46+ add_header 'Access-Control-Allow-Credentials' 'true' always;
5547
48+ location = /graphql {
5649 if ($request_method = 'OPTIONS') {
5750 add_header 'Access-Control-Allow-Origin' 'https://loa-life.vercel.app' always;
5851 add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
59- add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization' always;
52+ add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization,Apollo-Require-Preflight,x-apollo-operation-name,apollo-require-preflight ' always;
6053 add_header 'Access-Control-Allow-Credentials' 'true' always;
6154 add_header 'Access-Control-Max-Age' 1728000;
6255 add_header 'Content-Type' 'text/plain; charset=utf-8';
6356 add_header 'Content-Length' 0;
6457 return 204;
6558 }
59+
60+ proxy_pass http://localhost:3001;
61+ proxy_http_version 1.1;
62+ proxy_set_header Upgrade $http_upgrade;
63+ proxy_set_header Connection 'upgrade';
64+ proxy_set_header Host $host;
65+ proxy_cache_bypass $http_upgrade;
66+ }
67+
68+ location / {
69+ proxy_pass http://localhost:3001;
70+ proxy_http_version 1.1;
71+ proxy_set_header Upgrade $http_upgrade;
72+ proxy_set_header Connection 'upgrade';
73+ proxy_set_header Host $host;
74+ proxy_cache_bypass $http_upgrade;
6675 }
6776 }
6877 EOF
0 commit comments