From 143935b917373b7daa3ffbad2e443fc9bca4d101 Mon Sep 17 00:00:00 2001 From: binwiederhier Date: Sat, 14 Mar 2026 08:42:07 -0400 Subject: [PATCH] More refining --- cmd/serve.go | 4 +- docs/config.md | 62 ++++---- docs/static/css/config-generator.css | 23 +++ docs/static/js/config-generator.js | 208 +++++++++++++++++++++------ 4 files changed, 221 insertions(+), 76 deletions(-) diff --git a/cmd/serve.go b/cmd/serve.go index 313ec835..5dcfcaff 100644 --- a/cmd/serve.go +++ b/cmd/serve.go @@ -282,7 +282,9 @@ func execServe(c *cli.Context) error { } // Check values - if databaseURL != "" && (authFile != "" || cacheFile != "" || webPushFile != "") { + if databaseURL != "" && !strings.HasPrefix(databaseURL, "postgres://") { + return errors.New("if database-url is set, it must start with postgres://") + } else if databaseURL != "" && (authFile != "" || cacheFile != "" || webPushFile != "") { return errors.New("if database-url is set, auth-file, cache-file, and web-push-file must not be set") } else if firebaseKeyFile != "" && !util.FileExists(firebaseKeyFile) { return errors.New("if set, FCM key file must exist") diff --git a/docs/config.md b/docs/config.md index b01ad698..e568904f 100644 --- a/docs/config.md +++ b/docs/config.md @@ -145,7 +145,7 @@ This generator helps you configure your self-hosted ntfy instance. It's not full
-Config generator +Config generatorBETA This generator helps you configure your self-hosted ntfy instance. It's not fully featured, but it is a good starting point.
@@ -178,10 +178,11 @@ This generator helps you configure your self-hosted ntfy instance. It's not full
- +
+
@@ -210,7 +211,7 @@ This generator helps you configure your self-hosted ntfy instance. It's not full