summaryrefslogtreecommitdiffstats
path: root/tv/2configs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2020-12-02 00:43:07 +0100
committertv <tv@krebsco.de>2020-12-02 00:43:07 +0100
commit75ada52b9358149e73b0bfd1a379d91d440ee383 (patch)
treefe049e9e8f949306a3425e3eb08870f0cff92908 /tv/2configs
parent0ff1aae7c865fe9b5b6c9b6b1cc34194d96310ad (diff)
tv elm-package-proxy: allow GET on /all-packages
Diffstat (limited to 'tv/2configs')
-rw-r--r--tv/2configs/elm-packages-proxy.nix8
1 files changed, 2 insertions, 6 deletions
diff --git a/tv/2configs/elm-packages-proxy.nix b/tv/2configs/elm-packages-proxy.nix
index 67be047..ecced3d 100644
--- a/tv/2configs/elm-packages-proxy.nix
+++ b/tv/2configs/elm-packages-proxy.nix
@@ -39,10 +39,6 @@ in {
proxy_set_header X-Version $version;
proxy_pass_header Server;
- if ($request_method != POST) {
- return 405;
- }
-
proxy_pass http://127.0.0.1:${toString config.krebs.htgen.elm-packages-proxy.port};
'';
@@ -171,7 +167,7 @@ in {
fi
exit
;;
- 'POST /all-packages')
+ 'GET /all-packages'|'POST /all-packages')
response=$(mktemp -t htgen.$$.elm-packages-proxy.all-packages.XXXXXXXX)
trap "rm $response >&2" EXIT
@@ -201,7 +197,7 @@ in {
file_response 200 OK "$response" 'application/json; charset=UTF-8'
exit
;;
- 'POST /all-packages/since/'*)
+ 'GET /all-packages/since/'*|'POST /all-packages/since/'*)
response=$(mktemp -t htgen.$$.elm-packages-proxy.all-packages.XXXXXXXX)
trap "rm $response >&2" EXIT