mirror of https://gitlab.crans.org/nounous/nixos
Fix media + infiny loop with auth
parent
01557d89aa
commit
2a266f69e8
|
@ -55,13 +55,15 @@
|
||||||
|
|
||||||
report_stats = false;
|
report_stats = false;
|
||||||
|
|
||||||
|
public_baseurl = "https://matrix.crans.org/";
|
||||||
|
|
||||||
listeners = [
|
listeners = [
|
||||||
{
|
{
|
||||||
port = 8008;
|
port = 8008;
|
||||||
tls = false;
|
tls = false;
|
||||||
bind_addresses = [
|
bind_addresses = [
|
||||||
"::"
|
"::1"
|
||||||
"0.0.0.0"
|
"127.0.0.1"
|
||||||
];
|
];
|
||||||
type = "http";
|
type = "http";
|
||||||
x_forwarded = true;
|
x_forwarded = true;
|
||||||
|
@ -199,5 +201,17 @@
|
||||||
proxy_set_header Host $host;
|
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;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue