summaryrefslogtreecommitdiffstats
path: root/tv/2configs/elm-packages-proxy.nix
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
commit08e9db31d6b20cbef0a10414e135cb58b39f91e5 (patch)
tree2ab912b58424d030de1889fc95fa856285655092 /tv/2configs/elm-packages-proxy.nix
parentbe9250c92277bec7672e6f23ced21820888ea065 (diff)
tv elm-package-proxy: allow GET on /all-packages
Diffstat (limited to 'tv/2configs/elm-packages-proxy.nix')
-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 67be0478b..ecced3da2 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