[nginx] P-Real-IP -> X-Real-IP

Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
certbot_on_virtu
Yohann D'ANELLO 2021-03-04 10:56:01 +01:00
parent 9f97936635
commit 6054b7a545
Signed by: _ynerant
GPG Key ID: 3A75C55819C8CF85
4 changed files with 12 additions and 12 deletions

View File

@ -11,7 +11,7 @@ server {
{% for realip in nginx.real_ip_from %} {% for realip in nginx.real_ip_from %}
set_real_ip_from {{ realip }}; set_real_ip_from {{ realip }};
{% endfor %} {% endfor %}
real_ip_header P-Real-Ip; real_ip_header X-Real-Ip;
location / { location / {
return 302 http://{{ site.to }}$request_uri; return 302 http://{{ site.to }}$request_uri;
@ -31,7 +31,7 @@ server {
{% for realip in nginx.real_ip_from %} {% for realip in nginx.real_ip_from %}
set_real_ip_from {{ realip }}; set_real_ip_from {{ realip }};
{% endfor %} {% endfor %}
real_ip_header P-Real-Ip; real_ip_header X-Real-Ip;
location / { location / {
return 302 https://{{ site.to }}$request_uri; return 302 https://{{ site.to }}$request_uri;
@ -55,7 +55,7 @@ server {
{% for realip in nginx.real_ip_from %} {% for realip in nginx.real_ip_from %}
set_real_ip_from {{ realip }}; set_real_ip_from {{ realip }};
{% endfor %} {% endfor %}
real_ip_header P-Real-Ip; real_ip_header X-Real-Ip;
location / { location / {
return 302 http://{{ site.to }}$request_uri; return 302 http://{{ site.to }}$request_uri;
@ -75,7 +75,7 @@ server {
{% for realip in nginx.real_ip_from %} {% for realip in nginx.real_ip_from %}
set_real_ip_from {{ realip }}; set_real_ip_from {{ realip }};
{% endfor %} {% endfor %}
real_ip_header P-Real-Ip; real_ip_header X-Real-Ip;
location / { location / {
return 302 https://{{ site.to }}$request_uri; return 302 https://{{ site.to }}$request_uri;

View File

@ -18,7 +18,7 @@ server {
{% for realip in nginx.real_ip_from %} {% for realip in nginx.real_ip_from %}
set_real_ip_from {{ realip }}; set_real_ip_from {{ realip }};
{% endfor %} {% endfor %}
real_ip_header P-Real-Ip; real_ip_header X-Real-Ip;
location / { location / {
return 302 https://$host$request_uri; return 302 https://$host$request_uri;
@ -51,7 +51,7 @@ server {
{% for realip in nginx.real_ip_from %} {% for realip in nginx.real_ip_from %}
set_real_ip_from {{ realip }}; set_real_ip_from {{ realip }};
{% endfor %} {% endfor %}
real_ip_header P-Real-Ip; real_ip_header X-Real-Ip;
location / { location / {
proxy_pass http://{{ site.to }}; proxy_pass http://{{ site.to }};

View File

@ -15,7 +15,7 @@ server {
{% for realip in nginx.real_ip_from %} {% for realip in nginx.real_ip_from %}
set_real_ip_from {{ realip }}; set_real_ip_from {{ realip }};
{% endfor %} {% endfor %}
real_ip_header P-Real-Ip; real_ip_header X-Real-Ip;
location / { location / {
return 302 http://{{ to }}$request_uri; return 302 http://{{ to }}$request_uri;
@ -35,7 +35,7 @@ server {
{% for realip in nginx.real_ip_from %} {% for realip in nginx.real_ip_from %}
set_real_ip_from {{ realip }}; set_real_ip_from {{ realip }};
{% endfor %} {% endfor %}
real_ip_header P-Real-Ip; real_ip_header X-Real-Ip;
location / { location / {
return 302 https://{{ to }}$request_uri; return 302 https://{{ to }}$request_uri;

View File

@ -30,7 +30,7 @@ server {
{% for realip in nginx.real_ip_from %} {% for realip in nginx.real_ip_from %}
set_real_ip_from {{ realip }}; set_real_ip_from {{ realip }};
{% endfor %} {% endfor %}
real_ip_header P-Real-Ip; real_ip_header X-Real-Ip;
location / { location / {
return 302 https://{{ nginx.default_ssl_server }}$request_uri; return 302 https://{{ nginx.default_ssl_server }}$request_uri;
@ -53,7 +53,7 @@ server {
{% for realip in nginx.real_ip_from %} {% for realip in nginx.real_ip_from %}
set_real_ip_from {{ realip }}; set_real_ip_from {{ realip }};
{% endfor %} {% endfor %}
real_ip_header P-Real-Ip; real_ip_header X-Real-Ip;
location / { location / {
return 302 http://{{ nginx.default_server }}$request_uri; return 302 http://{{ nginx.default_server }}$request_uri;
@ -77,7 +77,7 @@ server {
{% for realip in nginx.real_ip_from %} {% for realip in nginx.real_ip_from %}
set_real_ip_from {{ realip }}; set_real_ip_from {{ realip }};
{% endfor %} {% endfor %}
real_ip_header P-Real-Ip; real_ip_header X-Real-Ip;
location / { location / {
return 302 https://$host$request_uri; return 302 https://$host$request_uri;
@ -104,7 +104,7 @@ server {
{% for realip in nginx.real_ip_from %} {% for realip in nginx.real_ip_from %}
set_real_ip_from {{ realip }}; set_real_ip_from {{ realip }};
{% endfor %} {% endfor %}
real_ip_header P-Real-Ip; real_ip_header X-Real-Ip;
{% if server.root is defined %}root {{ server.root }};{% endif %} {% if server.root is defined %}root {{ server.root }};{% endif %}
{% if server.index is defined %}index {{ server.index|join(" ") }};{% endif %} {% if server.index is defined %}index {{ server.index|join(" ") }};{% endif %}