Proxy WebSockets to photoprism

This commit is contained in:
Jordan Holt 2024-03-31 23:23:14 +01:00
parent 16138921fd
commit 94f97a27cd
Signed by: jordan
GPG Key ID: B8CFFF61F1CCF520

View File

@ -17,7 +17,20 @@ in {
"gallery.vimium.com" = {
forceSSL = true;
enableACME = true;
locations."/".proxyPass = "http://localhost:${toString config.services.photoprism.port}";
locations."/" = {
proxyPass = "http://localhost:${toString config.services.photoprism.port}";
extraConfig = ''
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_buffering off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
'';
};
};
};
};