Use redirect instead of rewrite for reverse proxy example

According to http://nginx.org/en/docs/http/converting_rewrite_rules.html this is the better way to implement redirects. It is easier to parse and understand.
This commit is contained in:
Hendrik Haas 2024-10-22 13:27:00 +02:00 committed by GitHub
parent 6082aef5d5
commit febd1e1107
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -9,7 +9,7 @@ server {
listen [::]:80;
server_name <your_server_name>;
rewrite ^(.*)$ https://$host$1 permanent;
return 301 https://$host$request_uri;
}
map $http_upgrade $connection_upgrade {