wiki.r: listen on localhost, fix http redirect

This commit is contained in:
lassulus 2021-12-10 10:13:49 +01:00
parent 6d3ea779b6
commit 9841e402e2

View File

@ -29,6 +29,7 @@ in
{ {
services.gollum = { services.gollum = {
enable = true; enable = true;
address = "::";
extraConfig = '' extraConfig = ''
Gollum::Hook.register(:post_commit, :hook_id) do |committer, sha1| Gollum::Hook.register(:post_commit, :hook_id) do |committer, sha1|
system('${pushCgit}') system('${pushCgit}')
@ -45,12 +46,13 @@ in
virtualHosts."wiki.r" = { virtualHosts."wiki.r" = {
enableACME = true; enableACME = true;
addSSL = true; addSSL = true;
locations."/".extraConfig = '' locations."/" = {
proxy_set_header Upgrade $http_upgrade; proxyPass = "http://[::]:${toString config.services.gollum.port}";
proxy_set_header Connection "upgrade"; proxyWebsockets = true;
proxy_set_header Host $host; extraConfig = ''
proxy_pass http://127.0.0.1:${toString config.services.gollum.port}; proxy_set_header Host $host;
''; '';
};
}; };
}; };