Use $http_host instead of $host

$host doesn't include port that causes issues if peertube is installed
on a non-classic HTTP port

Signed-off-by: Chocobozzz <me@florianbigard.com>
develop
Chocobozzz 2025-01-06 08:35:34 +01:00
parent ef41413f05
commit 6a03b50087
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 3 additions and 3 deletions

View File

@ -61,7 +61,7 @@ server {
location @api {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
client_max_body_size 100k; # default is 1M
@ -126,7 +126,7 @@ server {
location @api_websocket {
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
@ -210,7 +210,7 @@ server {
# We can't rate limit a try_files directive, so we need to duplicate @api
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_limit_rate 5M;