Skip to content

Commit

Permalink
Update nginx.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
RadovanTomik authored Oct 15, 2024
1 parent ef3b9e8 commit 0138060
Showing 1 changed file with 26 additions and 15 deletions.
41 changes: 26 additions & 15 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
server {
listen 8080;
server_name localhost;
root /app;
index index.html;

location / {
try_files /index.html =404;
}

# Optional: Basic Security Headers
add_header X-Content-Type-Options nosniff;
add_header X-Frame-Options DENY;
add_header Referrer-Policy no-referrer;
}
server {
listen 8080;
server_name localhost;
root /app;
index index.html;

add_header X-Content-Type-Options nosniff;
add_header X-Frame-Options DENY;
add_header Referrer-Policy no-referrer;

# Serve the maintenance page with a 503 status
location / {
return 503;
}

# Define the error page for 503 errors
error_page 503 /index.html;

# Serve the maintenance page content
location = /index.html {
root /app;
}

access_log /dev/stdout;
error_log /dev/stderr;
}

0 comments on commit 0138060

Please sign in to comment.