diff --git a/spotnet.conf b/spotnet.conf index dcada1c5..78025cc4 100644 --- a/spotnet.conf +++ b/spotnet.conf @@ -40,7 +40,9 @@ server { proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto $scheme; proxy_redirect off; - try_files $uri /index.html; # Ensure React routes work correctly + + # Ensure React SPA routes are handled correctly + try_files $uri /index.html =404; } } @@ -48,5 +50,6 @@ server { listen 80; server_name spotnet.xyz; + # Redirect all HTTP traffic to HTTPS return 301 https://$host$request_uri; } \ No newline at end of file