mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-05-23 07:17:37 +02:00
Fix baseURL check
This commit is contained in:
parent
8af9a97518
commit
aab705f4a4
2 changed files with 3 additions and 3 deletions
cmd
|
@ -124,7 +124,7 @@ func execServe(c *cli.Context) error {
|
|||
return errors.New("if smtp-server-listen is set, smtp-server-domain must also be set")
|
||||
} else if attachmentCacheDir != "" && baseURL == "" {
|
||||
return errors.New("if attachment-cache-dir is set, base-url must also be set")
|
||||
} else if baseURL != "" && (strings.HasPrefix(baseURL, "http://") || strings.HasPrefix(baseURL, "https://")) {
|
||||
} else if baseURL != "" && !strings.HasPrefix(baseURL, "http://") && !strings.HasPrefix(baseURL, "https://") {
|
||||
return errors.New("if set, base-url must start with http:// or https://")
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue