also reverse-proxy cache.nixos.org and fix port

This commit is contained in:
Charlotte 🦝 Delenk 2022-11-16 14:57:21 +01:00
parent 21e41f9af4
commit bab72253c0
Signed by: darkkirb
GPG key ID: AB2BD8DAF2E37122

View file

@ -71,17 +71,34 @@ in {
}
reverse_proxy @getOnly {
to http://localhost:24156
header_up Host {upstream_hostport}
header_up -Authorization
header_down -Set-Cookie
header_down Access-Control-Allow-Origin '*'
header_down -Access-Control-Allow-Methods
header_down Access-Control-Allow-Headers
header_up -Set-Cookie
@error status 500 404
handle_response @error {
reverse_proxy {
to http://localhost:24156
header_up Host {upstream_hostport}
header_up -Authorization
header_down -Set-Cookie
header_down Access-Control-Allow-Origin '*'
header_down -Access-Control-Allow-Methods
header_down Access-Control-Allow-Headers
header_up -Set-Cookie
transport http {
versions 1.1 2 3
transport http {
versions 1.1 2 3
}
}
to https://cache.nixos.org
header_up Host {upstream_hostport}
header_up -Authorization
header_down -Set-Cookie
header_down Access-Control-Allow-Origin '*'
header_down -Access-Control-Allow-Methods
header_down Access-Control-Allow-Headers
header_up -Set-Cookie
transport http {
versions 1.1 2 3
}
}
}
'';
@ -146,7 +163,7 @@ in {
listen = [
{
addr = "127.0.0.1";
port = 24155;
port = 24156;
}
];
locations."/" = {