فهرست منبع

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.
Hendrik Haas 11 ماه پیش
والد
کامیت
febd1e1107
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      docs/guide/nginx-proxy-example.md

+ 1 - 1
docs/guide/nginx-proxy-example.md

@@ -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 {