From 4cce15c7d4b7963409e60e31b97ccb1da40142ee Mon Sep 17 00:00:00 2001 From: Ahwx Date: Mon, 24 Mar 2025 16:35:13 +0100 Subject: [PATCH] chore: try some things with the sharkey proxy that are not done yet --- modules/services/sharkey-proxy.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/modules/services/sharkey-proxy.nix b/modules/services/sharkey-proxy.nix index 1fed4ce..416bfe9 100644 --- a/modules/services/sharkey-proxy.nix +++ b/modules/services/sharkey-proxy.nix @@ -15,6 +15,27 @@ proxy_set_header X-Forwarded-Host $remote_addr; ''; }; + + locations."/files/" = { + proxyPass = "http://localhost:3000"; + proxyWebsockets = true; + extraConfig = '' + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-Proto https; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Host $remote_addr; + + # Try cache? + # proxy_cache sharkey; + # proxy_cache_path /var/cache/nginx/sharkey levels=1:2 keys_zone=sharkey:15m; + # proxy_cache_lock on; + # proxy_cache_use_stale updating; + # proxy_force_ranges on; + # add_header X-Cache $upstream_cache_status; + ''; + }; + locations."/wiki/" = { # Nepenthis proxyPass = "http://localhost:8893";