diff --git a/nginx.prod.conf b/nginx.prod.conf index 88b55b4..59a7331 100644 --- a/nginx.prod.conf +++ b/nginx.prod.conf @@ -76,4 +76,24 @@ server { add_header Access-Control-Allow-Methods "GET, POST, OPTIONS, PUT, DELETE" always; add_header Access-Control-Allow-Headers "Authorization,Content-Type,Accept,X-Requested-With" always; } + + location /blindbit/ { + if ($request_method = 'OPTIONS') { + add_header 'Access-Control-Allow-Origin' '*' always; + add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS' always; + add_header 'Access-Control-Allow-Headers' 'Content-Type, Authorization, X-Requested-With' always; + add_header 'Access-Control-Max-Age' 86400; + add_header 'Content-Length' 0; + add_header 'Content-Type' 'text/plain'; + return 204; + } + + add_header 'Access-Control-Allow-Origin' '*' always; + add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS' always; + add_header 'Access-Control-Allow-Headers' 'Content-Type, Authorization, X-Requested-With' always; + + proxy_pass http://localhost:8000/; + proxy_http_version 1.1; + proxy_set_header Host $host; + } } \ No newline at end of file