diff options
| author | Grisha Shipunov | 2025-06-11 22:53:22 +0200 |
|---|---|---|
| committer | Grisha Shipunov | 2025-06-13 02:43:39 +0200 |
| commit | 2a44e5c81e2d46766ed095d5e94c5fafbd5d85fa (patch) | |
| tree | a92be8f459d29acb7b9c3e405c51c35ccc67ecfe /hosts/cloud/proxy/default.nix | |
| parent | 3e6faa5d092ef00255adbf7edd4efe2d15accb3f (diff) | |
deploy stream (navidrome) microvm
Diffstat (limited to 'hosts/cloud/proxy/default.nix')
| -rw-r--r-- | hosts/cloud/proxy/default.nix | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/hosts/cloud/proxy/default.nix b/hosts/cloud/proxy/default.nix index 9994da4..6cf0151 100644 --- a/hosts/cloud/proxy/default.nix +++ b/hosts/cloud/proxy/default.nix @@ -60,5 +60,37 @@ in ''; virtualHosts."news.oxapentane.com".extraConfig = "reverse_proxy http://10.89.88.14:8080"; + + virtualHosts."music.oxapentane.com".extraConfig = '' + route { + reverse_proxy /outpost.goauthentik.io/* 10.89.88.11:9000 [fd31:185d:722f::11]:9000 + + @protected not path /share/* /rest/* + forward_auth @protected 10.89.88.11:9000 { + uri /outpost.goauthentik.io/auth/caddy + copy_headers X-Authentik-Username>Remote-User + trusted_proxies 10.89.88.11 fd31:185d:722f::11 + } + + + @subsonic path /rest/* + forward_auth @subsonic 10.89.88.11:9000 { + uri /outpost.goauthentik.io/auth/caddy + copy_headers X-Authentik-Username>Remote-User + @error status 1xx 3xx 4xx 5xx + handle_response @error { + respond <<SUBSONICERR + <subsonic-response xmlns="http://subsonic.org/restapi" status="failed" version="1.16.1" type="proxy-auth" serverVersion="n/a" openSubsonic="true"> + <error code="40" message="Invalid credentials or unsupported client"></error> + </subsonic-response> + SUBSONICERR 200 + } + trusted_proxies 10.89.88.11 fd31:185d:722f::11 + } + } + reverse_proxy 10.89.88.17:4533 + + ''; + }; } |
