feat(manage): add /manage pages to edit caption and date
/manage lists every photo; /manage/edit/{slug} rewrites the photo's
.toml sidecar, which triggers a rebuild. The pages sit behind the same
htpasswd as /upload and are not linked from the public site.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
+7
-1
@@ -94,7 +94,7 @@ in {
|
||||
htpasswdFile = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
example = "/etc/nginx/.htpasswd-gallery";
|
||||
description = "Path to htpasswd file protecting the /upload endpoint.";
|
||||
description = "Path to htpasswd file protecting the /upload and /manage endpoints.";
|
||||
};
|
||||
|
||||
enableACME = lib.mkOption {
|
||||
@@ -184,6 +184,12 @@ in {
|
||||
basicAuthFile = cfg.nginx.htpasswdFile;
|
||||
extraConfig = "client_max_body_size 20M;";
|
||||
};
|
||||
|
||||
locations."/manage" = {
|
||||
proxyPass = "http://127.0.0.1:${toString cfg.port}";
|
||||
basicAuth = "gallery";
|
||||
basicAuthFile = cfg.nginx.htpasswdFile;
|
||||
};
|
||||
};
|
||||
};
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user