mirror of
https://github.com/semaphoreui/semaphore.git
synced 2025-01-19 23:09:21 +01:00
fix(tls): correct redirect
This commit is contained in:
parent
c59f2cb584
commit
25bbbcae3a
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,5 +1,6 @@
|
||||
gin-bin
|
||||
build/
|
||||
/certs/
|
||||
web/public/js/bundle.js
|
||||
web/public/css/*.*
|
||||
web/public/html/**/*.*
|
||||
|
@ -126,7 +126,7 @@ func runService() {
|
||||
} else {
|
||||
hostParts := strings.Split(r.Host, ":")
|
||||
host := hostParts[0]
|
||||
target += host + port[1:] + r.URL.Path
|
||||
target += host + port + r.URL.Path
|
||||
}
|
||||
|
||||
if len(r.URL.RawQuery) > 0 {
|
||||
@ -146,7 +146,7 @@ func runService() {
|
||||
}()
|
||||
}
|
||||
|
||||
err = http.ListenAndServeTLS(util.Config.Interface+port, util.Config.TLS.TLSCertFile, util.Config.TLS.TLSKeyFile, cropTrailingSlashMiddleware(router))
|
||||
err = http.ListenAndServeTLS(util.Config.Interface+port, util.Config.TLS.CertFile, util.Config.TLS.KeyFile, cropTrailingSlashMiddleware(router))
|
||||
|
||||
if err != nil {
|
||||
log.Panic(err)
|
||||
|
@ -113,8 +113,8 @@ type RunnerConfig struct {
|
||||
}
|
||||
|
||||
type TLSConfig struct {
|
||||
TLSCertFile string `json:"tls_cert_file,omitempty" env:"SEMAPHORE_TLS_CERT_FILE"`
|
||||
TLSKeyFile string `json:"tls_key_file,omitempty" env:"SEMAPHORE_TLS_KEY_FILE"`
|
||||
CertFile string `json:"cert_file,omitempty" env:"SEMAPHORE_TLS_CERT_FILE"`
|
||||
KeyFile string `json:"key_file,omitempty" env:"SEMAPHORE_TLS_KEY_FILE"`
|
||||
HTTPRedirectPort *int `json:"http_redirect_port,omitempty" env:"SEMAPHORE_TLS_HTTP_PORT"`
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user