diff --git a/machines/gerd/services/miniflux.nix b/machines/gerd/services/miniflux.nix index 4f5c985..78c4780 100644 --- a/machines/gerd/services/miniflux.nix +++ b/machines/gerd/services/miniflux.nix @@ -3,13 +3,16 @@ let svc_domain = "miniflux.${config.mine.shared.settings.domain}"; port = 6466; + + listenOn = "localhost:${builtins.toString port}"; + httpListenOn = "http://${listenOn}"; in { services.miniflux = { enable = true; config = { # listen only on localhost - LISTEN_ADDR = "localhost:${builtins.toString port}"; + LISTEN_ADDR = listenOn; # setup the correct baseurl BASE_URL = "https://${svc_domain}"; @@ -34,10 +37,15 @@ in { enableACME = true; locations."/" = config.mine.shared.lib.authelia.mkProtectedLocation { - proxyPass = "http://localhost:${builtins.toString port}"; + proxyPass = httpListenOn; }; - locations."/v1".proxyPass = "http://localhost:${builtins.toString port}"; + # allow API for mobile apps etc. + locations."/v1".proxyPass = httpListenOn; + + # allow sharing + locations."/share".proxyPass = httpListenOn; + locations."~* \.(js|jpg|png|css)$".proxyPass = httpListenOn; }; # meta