From d0c6caac7ca877c09ce32b7e27a991cbdf7b583c Mon Sep 17 00:00:00 2001 From: sinavir Date: Wed, 8 Nov 2023 22:31:03 +0100 Subject: [PATCH] fix(castopod): Add support for HEAD requests using an nginx trick --- patches/castopod.patch | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/patches/castopod.patch b/patches/castopod.patch index 73df444..9d4d38c 100644 --- a/patches/castopod.patch +++ b/patches/castopod.patch @@ -266,7 +266,7 @@ new file mode 100644 index 00000000000000..b782b548914795 --- /dev/null +++ b/nixos/modules/services/audio/castopod.nix -@@ -0,0 +1,287 @@ +@@ -0,0 +1,297 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.services.castopod; @@ -522,6 +522,14 @@ index 00000000000000..b782b548914795 + index index.php index.html; + ''; + ++ locations."@force_get" = { ++ extraConfig = '' ++ recursive_error_pages on; ++ proxy_method GET; ++ proxy_pass https://podcasts.dgnum.eu; ++ ''; ++ }; ++ + locations."^~ /${cfg.settings."media.root"}/" = { + root = cfg.settings."media.storage"; + extraConfig = '' @@ -536,6 +544,8 @@ index 00000000000000..b782b548914795 + SERVER_NAME = "$host"; + }; + extraConfig = '' ++ error_page 550 = @force_get; ++ if ($request_method = HEAD) { return 550; } + fastcgi_intercept_errors on; + fastcgi_index index.php; + fastcgi_pass unix:${fpm.socket};