add comments of x-fowarded-XXX headers

This commit is contained in:
xiahaoshawn 2016-04-14 18:29:18 +08:00
parent b3075e46c2
commit 4cb5ed3ee5

View File

@ -45,9 +45,12 @@ http {
location / {
proxy_pass http://ui/;
proxy_set_header Host $http_host;
# Remove the following three lines if setting up harbor behind an nginx proxy or Elastic Load Balancing.
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering off;
proxy_request_buffering off;
}
@ -59,9 +62,12 @@ http {
location /v2/ {
proxy_pass http://registry/v2/;
proxy_set_header Host $http_host;
# Remove the following three lines if setting up harbor behind an nginx proxy or Elastic Load Balancing.
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering off;
proxy_request_buffering off;
@ -70,9 +76,12 @@ http {
location /service/ {
proxy_pass http://ui/service/;
proxy_set_header Host $http_host;
# Remove the following three lines if setting up harbor behind an nginx proxy or Elastic Load Balancing.
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering off;
proxy_request_buffering off;
}