also reverse-proxy cache.nixos.org and fix port
This commit is contained in:
parent
21e41f9af4
commit
bab72253c0
1 changed files with 28 additions and 11 deletions
|
@ -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."/" = {
|
||||
|
|
Loading…
Reference in a new issue