1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2024-09-27 19:12:00 +02:00
This commit is contained in:
Philipp Heckel 2021-12-07 10:38:58 -05:00
parent f1fac8da75
commit da8f90d388
3 changed files with 9 additions and 9 deletions

View file

@ -123,7 +123,7 @@ release-check-tags:
exit 1;\ exit 1;\
fi fi
release: build-deps release-check-tags release: build-deps release-check-tags check
goreleaser release --rm-dist --debug goreleaser release --rm-dist --debug
release-snapshot: build-deps release-snapshot: build-deps

View file

@ -27,9 +27,9 @@ const (
// Config is the main config struct for the application. Use New to instantiate a default config struct. // Config is the main config struct for the application. Use New to instantiate a default config struct.
type Config struct { type Config struct {
ListenHTTP string ListenHTTP string
ListenHTTPS string ListenHTTPS string
KeyFile string KeyFile string
CertFile string CertFile string
FirebaseKeyFile string FirebaseKeyFile string
CacheFile string CacheFile string
CacheDuration time.Duration CacheDuration time.Duration
@ -46,9 +46,9 @@ type Config struct {
func New(listenHTTP string) *Config { func New(listenHTTP string) *Config {
return &Config{ return &Config{
ListenHTTP: listenHTTP, ListenHTTP: listenHTTP,
ListenHTTPS: "", ListenHTTPS: "",
KeyFile: "", KeyFile: "",
CertFile: "", CertFile: "",
FirebaseKeyFile: "", FirebaseKeyFile: "",
CacheFile: "", CacheFile: "",
CacheDuration: DefaultCacheDuration, CacheDuration: DefaultCacheDuration,

View file

@ -83,7 +83,7 @@ var (
rawRegex = regexp.MustCompile(`^/[-_A-Za-z0-9]{1,64}(,[-_A-Za-z0-9]{1,64})*/raw$`) rawRegex = regexp.MustCompile(`^/[-_A-Za-z0-9]{1,64}(,[-_A-Za-z0-9]{1,64})*/raw$`)
staticRegex = regexp.MustCompile(`^/static/.+`) staticRegex = regexp.MustCompile(`^/static/.+`)
docsRegex = regexp.MustCompile(`^/docs(|/.*)$`) docsRegex = regexp.MustCompile(`^/docs(|/.*)$`)
//go:embed "index.gohtml" //go:embed "index.gohtml"
indexSource string indexSource string
@ -97,7 +97,7 @@ var (
webStaticFsCached = &util.CachingEmbedFS{ModTime: time.Now(), FS: webStaticFs} webStaticFsCached = &util.CachingEmbedFS{ModTime: time.Now(), FS: webStaticFs}
//go:embed docs //go:embed docs
docsStaticFs embed.FS docsStaticFs embed.FS
docsStaticCached = &util.CachingEmbedFS{ModTime: time.Now(), FS: docsStaticFs} docsStaticCached = &util.CachingEmbedFS{ModTime: time.Now(), FS: docsStaticFs}
errHTTPBadRequest = &errHTTP{http.StatusBadRequest, http.StatusText(http.StatusBadRequest)} errHTTPBadRequest = &errHTTP{http.StatusBadRequest, http.StatusText(http.StatusBadRequest)}