From d6ef8d27ea4656fccb90fd0f4db147b2c206de16 Mon Sep 17 00:00:00 2001 From: teidesu Date: Tue, 13 Aug 2024 01:43:51 +0300 Subject: [PATCH] feat(koi): tei.su MEOW method -> /api/meow --- hosts/koi/containers/teisu.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/hosts/koi/containers/teisu.nix b/hosts/koi/containers/teisu.nix index a435e18..1b5e441 100644 --- a/hosts/koi/containers/teisu.nix +++ b/hosts/koi/containers/teisu.nix @@ -38,6 +38,11 @@ in { locations."/" = { proxyPass = "http://teisu.docker:4321$request_uri"; + extraConfig = '' + if ($request_method = MEOW) { + rewrite ^ /.meow-proxy last; + } + ''; }; locations."/.well-known/" = { @@ -46,5 +51,13 @@ in { add_header 'Access-Control-Allow-Origin' '*'; ''; }; + + locations."/.meow-proxy" = { + proxyPass = "http://teisu.docker:4321/api/meow"; + extraConfig = '' + proxy_method GET; + internal; + ''; + }; }; } \ No newline at end of file