enhance(backend): allow disabling HTTP port completely#911
enhance(backend): allow disabling HTTP port completely#911eternal-flame-AD wants to merge 1 commit intomasterfrom
Conversation
Signed-off-by: Yumechi <yume@yumechi.jp>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #911 +/- ##
==========================================
- Coverage 78.70% 78.51% -0.19%
==========================================
Files 57 57
Lines 2517 2523 +6
==========================================
Hits 1981 1981
- Misses 397 403 +6
Partials 139 139 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
|
||
| hasListener := false | ||
|
|
||
| if conf.Server.Port >= 0 { |
There was a problem hiding this comment.
Could this instead be a enabled setting similar to the one for TLS? Should be default true.
There was a problem hiding this comment.
I guess so, but it would be called GOTIFY_SERVER_ENABLED=false which semantically sounds funny.
There was a problem hiding this comment.
GOTIFY_SERVER_ENABLED=false it really looks confusing... Some may even think that "huh? My server disabled? :p"
But we can use like
GOTIFY_PLAIN_SERVER_ENABLED=false
Or
GOTIFY_HTTP_SERVER_ENABLED=false
There was a problem hiding this comment.
What I am trying to say is the name of these keys are tied to the yaml hierarchy by the configor, so if we add a key side by side with the current "port" key it would be called GOTIFY_SERVER_SOMETHING, which I don't like.
But I guess we can use GOTIFY_SERVER_DISABLE_HTTP or GOTIFY_SERVER_HTTP_FUNC=on/off/redirect , both should be good options forward
Resolves #910