feat: redirect HTTP requests to HTTPS

Replace the 404 response on port 80 with a 301 redirect to the
equivalent HTTPS URL, so users who type http:// are seamlessly
upgraded to a secure connection.
This commit is contained in:
lingkai5wu committed 2026-10-12 13:00:22 +08:00
1 parent 1be33450f0
commit a7a1051ea1
1 file changed
+1 -1
+1 -1
View File
@@ -9,7 +9,7 @@ server {
listen [::]:80 default_server;
server_name _;
return 404;
return 301 https://$host$request_uri;
}
server {