repalce redirect_to_https with entrypoint middleware

This commit is contained in:
yusing
2024-11-30 08:50:23 +08:00
parent 796a4a693a
commit f8bdc7044c
8 changed files with 30 additions and 61 deletions

View File

@@ -132,12 +132,11 @@ func main() {
}
server.StartServer(server.Options{
Name: "proxy",
CertProvider: autocert,
HTTPAddr: common.ProxyHTTPAddr,
HTTPSAddr: common.ProxyHTTPSAddr,
Handler: http.HandlerFunc(entrypoint.Handler),
RedirectToHTTPS: config.Value().Entrypoint.RedirectToHTTPS,
Name: "proxy",
CertProvider: autocert,
HTTPAddr: common.ProxyHTTPAddr,
HTTPSAddr: common.ProxyHTTPSAddr,
Handler: http.HandlerFunc(entrypoint.Handler),
})
server.StartServer(server.Options{
Name: "api",