Fix media + infiny loop with auth

neo
Lzebulon 2025-04-08 22:43:49 +02:00
parent 01557d89aa
commit 2a266f69e8
No known key found for this signature in database
GPG Key ID: D6CDAB8050CBBE7D
1 changed files with 16 additions and 2 deletions

View File

@ -55,13 +55,15 @@
report_stats = false;
public_baseurl = "https://matrix.crans.org/";
listeners = [
{
port = 8008;
tls = false;
bind_addresses = [
"::"
"0.0.0.0"
"::1"
"127.0.0.1"
];
type = "http";
x_forwarded = true;
@ -199,5 +201,17 @@
proxy_set_header Host $host;
'';
};
locations."/media" = {
proxyPass = "http://localhost:11111";
extraConfig = ''
rewrite ^/media(.*)$ $1 break;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host;
'';
};
};
}