diff --git a/_examples/http-listening/listen-tls/main.go b/_examples/http-listening/listen-tls/main.go index 04b57de6..a6bfdbe5 100644 --- a/_examples/http-listening/listen-tls/main.go +++ b/_examples/http-listening/listen-tls/main.go @@ -22,7 +22,7 @@ func main() { // to start a new server listening at :80 and redirects // to the secure address, then: target, _ := url.Parse("https://127.0.1:443") - go host.NewProxy("127.0.0.1:80", target).ListenAndServe() + go host.NewRedirection("127.0.0.1:80", target, 301).ListenAndServe() // start the server (HTTPS) on port 443, this is a blocking func app.Run(iris.TLS("127.0.0.1:443", "mycert.cert", "mykey.key"))