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:
@@ -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)))
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user