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