From 1def4f50799a0d39678009ed8bf14ce2e8dc9e85 Mon Sep 17 00:00:00 2001 From: Allan Lires <32534293+ALires@users.noreply.github.com> Date: Fri, 3 Nov 2023 09:34:15 -0600 Subject: [PATCH] add local host to headers for nginx --- nginx.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nginx.conf b/nginx.conf index 484dc0039..4b6fc8f47 100644 --- a/nginx.conf +++ b/nginx.conf @@ -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';