add local host to headers for nginx

This commit is contained in:
Allan Lires 2023-11-03 09:34:15 -06:00
parent b9120aad76
commit 1def4f5079
1 changed files with 2 additions and 2 deletions

View File

@ -5,13 +5,13 @@ server {
index index.html index.htm;
location / {
add_header 'Access-Control-Allow-Origin' 'https://www.boot.dev';
add_header 'Access-Control-Allow-Origin' 'https://www.boot.dev, http://localhost:5000, http://localhost:8000';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' 'https://www.boot.dev';
add_header 'Access-Control-Allow-Origin' 'https://www.boot.dev, http://localhost:5000, http://localhost:8000';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';