1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-17 18:07:01 +00:00

General Improvements (UseRouter per Party, fix AutoTLS). Read HISTORY.md

relative to: https://github.com/kataras/iris/issues/1577 and https://github.com/kataras/iris/issues/1578
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-08-12 07:20:07 +03:00
parent da029d6f37
commit 0761bc35ee
15 changed files with 639 additions and 120 deletions

View File

@@ -25,8 +25,18 @@ func main() {
// and a non-public e-mail instead or edit your hosts file.
app.Run(iris.AutoTLS(":443", "example.com", "mail@example.com"))
// Note: to disable automatic "http://" to "https://" redirections pass the `iris.TLSNoRedirect`
// host configurator to TLS or AutoTLS functions, e.g:
//
// app.Run(iris.AutoTLS(":443", "example.com", "mail@example.com", iris.TLSNoRedirect))
// Note: to disable automatic "http://" to "https://" redirections pass
// the `iris.AutoTLSNoRedirect` host configurator to AutoTLS function, example:
/*
var fallbackServer = func(acme func(http.Handler) http.Handler) *http.Server {
// Use any http.Server and Handler, as long as it's wrapped by `acme` one.
// In that case we share the application through non-tls users too:
srv := &http.Server{Handler: acme(app)}
go srv.ListenAndServe()
return srv
}
app.Run(iris.AutoTLS(":443", "example.com", "mail@example.com",
iris.AutoTLSNoRedirect(fallbackServer)))
*/
}

View File

@@ -21,7 +21,7 @@ func main() {
app.Run(iris.TLS("127.0.0.1:443", "mycert.crt", "mykey.key"))
// Note: to disable automatic "http://" to "https://" redirections pass the `iris.TLSNoRedirect`
// host configurator to TLS or AutoTLS functions, e.g:
// host configurator to TLS function, example:
//
// app.Run(iris.TLS("127.0.0.1:443", "mycert.crt", "mykey.key", iris.TLSNoRedirect))
}