1
0
Fork 0

Fix rpg.maralorn.de/rules

This commit is contained in:
Malte Brandy 2022-02-07 02:45:32 +01:00
parent 209de86d5f
commit 53b24719aa

View file

@ -55,17 +55,20 @@ in
enableACME = true; enableACME = true;
locations = { locations = {
"/rules/" = { "/rules/" = {
root = pkgs.fetchFromGitHub { alias = "${pkgs.fetchzip {
owner = "5etools-mirror-1"; url = "https://github.com/5etools-mirror-1/5etools-mirror-1.github.io/releases/download/v1.149.1/5etools-v1.149.1.zip";
repo = "5etools-mirror-1.github.io"; sha256 = "sha256-vGGB0xaeQi4O4wIAFKtkRXCEPbB3TRo0OWhemBRCO5c=";
sha256 = "0000000000000000000000000000000000000000000000000000"; stripRoot = false;
}; }}/";
index = "index.html"; index = "index.html";
}; };
"/" = { "/" = {
proxyPass = "http://[::1]:${toString config.port}"; proxyPass = "http://[::1]:${toString config.port}";
proxyWebsockets = true; proxyWebsockets = true;
extraConfig = '' extraConfig = ''
if ($request_uri ~ ^/rules$) {
return 301 /rules/;
}
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;