mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-07-20 10:04:08 +00:00
Add TLS/HTTPS
This commit is contained in:
parent
1e7ae885b4
commit
07a1fe3acb
4 changed files with 52 additions and 6 deletions
|
@ -27,6 +27,9 @@ const (
|
|||
// Config is the main config struct for the application. Use New to instantiate a default config struct.
|
||||
type Config struct {
|
||||
ListenHTTP string
|
||||
ListenHTTPS string
|
||||
KeyFile string
|
||||
CertFile string
|
||||
FirebaseKeyFile string
|
||||
CacheFile string
|
||||
CacheDuration time.Duration
|
||||
|
@ -43,6 +46,9 @@ type Config struct {
|
|||
func New(listenHTTP string) *Config {
|
||||
return &Config{
|
||||
ListenHTTP: listenHTTP,
|
||||
ListenHTTPS: "",
|
||||
KeyFile: "",
|
||||
CertFile: "",
|
||||
FirebaseKeyFile: "",
|
||||
CacheFile: "",
|
||||
CacheDuration: DefaultCacheDuration,
|
||||
|
|
|
@ -5,6 +5,21 @@
|
|||
#
|
||||
# listen-http: ":80"
|
||||
|
||||
# Listen address for the HTTPS web server. If set, you must also set "key-file" and "cert-file".
|
||||
# Format: <hostname>:<port>
|
||||
#
|
||||
# listen-https:
|
||||
|
||||
# Path to the private key file for the HTTPS web server. Not used if "listen-https" is not set.
|
||||
# Format: <filename>
|
||||
#
|
||||
# key-file:
|
||||
|
||||
# Path to the cert file for the HTTPS web server. Not used if "listen-https" is not set.
|
||||
# Format: <filename>
|
||||
#
|
||||
# cert-file:
|
||||
|
||||
# If set, also publish messages to a Firebase Cloud Messaging (FCM) topic for your app.
|
||||
# This is optional and only required to support Android apps (which don't allow background services anymore).
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue