miniflux: add ability to share content

This commit is contained in:
eyjhb 2025-01-20 18:29:17 +01:00
parent 20ce4199ba
commit 3c2f598cb1
No known key found for this signature in database
GPG key ID: 609F508E3239F920

View file

@ -3,13 +3,16 @@
let let
svc_domain = "miniflux.${config.mine.shared.settings.domain}"; svc_domain = "miniflux.${config.mine.shared.settings.domain}";
port = 6466; port = 6466;
listenOn = "localhost:${builtins.toString port}";
httpListenOn = "http://${listenOn}";
in { in {
services.miniflux = { services.miniflux = {
enable = true; enable = true;
config = { config = {
# listen only on localhost # listen only on localhost
LISTEN_ADDR = "localhost:${builtins.toString port}"; LISTEN_ADDR = listenOn;
# setup the correct baseurl # setup the correct baseurl
BASE_URL = "https://${svc_domain}"; BASE_URL = "https://${svc_domain}";
@ -34,10 +37,15 @@ in {
enableACME = true; enableACME = true;
locations."/" = config.mine.shared.lib.authelia.mkProtectedLocation { 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 # meta