Skip to content

Commit

Permalink
nginx: replace $http_host by $host, cf https://github.com/yandex/gixy…
Browse files Browse the repository at this point in the history
  • Loading branch information
alexAubin committed Jul 4, 2023
1 parent 36a17df commit 3957b10
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion conf/nginx/redirect_to_admin.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
location / {
return 302 https://$http_host/yunohost/admin;
return 302 https://$host/yunohost/admin;
}
2 changes: 1 addition & 1 deletion conf/nginx/server.tpl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ server {
{# Note that this != "False" is meant to be failure-safe, in the case the redrect_to_https would happen to contain empty string or whatever value. We absolutely don't want to disable the HTTPS redirect *except* when it's explicitly being asked to be disabled. #}
{% if redirect_to_https != "False" %}
location / {
return 301 https://$http_host$request_uri;
return 301 https://$host$request_uri;
}
{# The app config snippets are not included in the HTTP conf unless HTTPS redirect is disabled, because app's location may blocks will conflict or bypass/ignore the HTTPS redirection. #}
{% else %}
Expand Down
2 changes: 1 addition & 1 deletion conf/nginx/yunohost_api.conf.inc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ location /yunohost/api/ {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header Host $host;

{% if webadmin_allowlist_enabled == "True" %}
{% for ip in webadmin_allowlist.split(',') %}
Expand Down

0 comments on commit 3957b10

Please sign in to comment.