File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,7 @@ func start(s *fiber.App) {
119119 go ssh .Serve ()
120120 }
121121 if ! config .Get ().Server .TLS .Enabled {
122+ log .WithField ("port" , config .Get ().Server .Port ).Info ("TLS is disabled starting http server" )
122123 log .WithError (s .Listen (fmt .Sprintf (":%d" , config .Get ().Server .Port ))).Fatal ()
123124 }
124125 // TLS enabled
@@ -133,9 +134,13 @@ func start(s *fiber.App) {
133134 )
134135 },
135136 )
136- go log .WithError (httpServer .Listen (":80" )).Fatal ()
137+ log .Info ("TLS and http redirect enabled, starting redirect server on port 80" )
138+ go func () {
139+ log .WithError (httpServer .Listen (":80" )).Fatal ()
140+ }()
137141 }
138142 time .Sleep (time .Millisecond ) // This is just for a more pretty output with the tls header printed after the http one
143+ log .Info ("TLS enabled, starting https server on port 443" )
139144 log .WithError (s .ListenTLS (":443" , config .Get ().Server .TLS .Cert , config .Get ().Server .TLS .Key )).Fatal ()
140145}
141146
You can’t perform that action at this time.
0 commit comments