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:
1 parent
1be33450f0
commit
a7a1051ea1
1 file changed
+1
-1
@@ -9,7 +9,7 @@ server {
|
|||||||
listen [::]:80 default_server;
|
listen [::]:80 default_server;
|
||||||
server_name _;
|
server_name _;
|
||||||
|
|
||||||
return 404;
|
return 301 https://$host$request_uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
|
|||||||
Reference in new issue
Block a user