From 8131d1444bd2e9c8dd9a1b275aea1ab2501a57c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Fri, 26 Aug 2022 17:00:06 +0100 Subject: [PATCH] bruh --- config/services/chir-rs.nix | 2 +- config/services/old-homepage.nix | 3 ++- config/services/reverse-proxy.nix | 7 ++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/config/services/chir-rs.nix b/config/services/chir-rs.nix index 3ca2aa0e..e3a59c55 100644 --- a/config/services/chir-rs.nix +++ b/config/services/chir-rs.nix @@ -13,9 +13,9 @@ useACMEHost = "chir.rs"; extraConfig = '' import baseConfig + rewrite * /api.chir.rs/{path} reverse_proxy { to http://localhost:8621 - rewrite * /api.chir.rs/{path} } ''; }; diff --git a/config/services/old-homepage.nix b/config/services/old-homepage.nix index 8db9415a..aa03ff9e 100644 --- a/config/services/old-homepage.nix +++ b/config/services/old-homepage.nix @@ -31,9 +31,10 @@ in { extraConfig = '' import baseConfig + rewrite * /file/darkkirb-de/{path} + reverse_proxy { to https://f000.backblazeb2.com - rewrite * /file/darkkirb-de/{path} header_up Host {upstream_hostport} transport http { diff --git a/config/services/reverse-proxy.nix b/config/services/reverse-proxy.nix index f90fec8a..6c6ddba7 100644 --- a/config/services/reverse-proxy.nix +++ b/config/services/reverse-proxy.nix @@ -9,12 +9,12 @@ useACMEHost = "chir.rs"; extraConfig = '' import baseConfig + ${extra} + reverse_proxy { to ${dest} header_up Host {upstream_hostport} - ${extra} - transport http { versions 1.1 2 3 } @@ -51,6 +51,8 @@ in { @getOnly { method GET } + rewrite * /file/mastodon-chir-rs/{path} + reverse_proxy @getOnly { to https://f000.backblazeb2.com header_up Host {upstream_hostport} @@ -60,7 +62,6 @@ in { header_down -Access-Control-Allow-Methods header_down Access-Control-Allow-Headers header_up -Set-Cookie - rewrite * /file/mastodon-chir-rs/{path} transport http { versions 1.1 2 3