Skip to content

Commit

Permalink
build: nginx.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfromyeg committed Jan 7, 2024
1 parent d49fa47 commit 6061799
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,17 @@ server {
ssl_session_timeout 10m;

add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
add_header 'Access-Control-Allow-Origin' 'bereal.michaeldemar.co';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'Content-Type, Authorization';
add_header 'Access-Control-Allow-Origin' 'https://bereal.michaeldemar.co' always;
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
add_header 'Access-Control-Allow-Headers' 'Content-Type, Authorization' always;

location / {
if ($http_user_agent ~* "DigitalOcean Uptime Probe") {
allow all;
}

if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' 'bereal.michaeldemar.co';
add_header 'Access-Control-Allow-Origin' 'https://bereal.michaeldemar.co';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'Content-Type, Authorization';
add_header 'Content-Length' 0;
Expand Down

0 comments on commit 6061799

Please sign in to comment.