From 9ffb04e72d64d78b695ce07ee38e51d693cacd1f Mon Sep 17 00:00:00 2001 From: "Gerasimos (Makis) Maropoulos" Date: Tue, 23 Jul 2019 19:35:04 +0300 Subject: [PATCH] from master Former-commit-id: 38143f9ea1230ac17a5a20fce0459b6ef3804d90 --- _examples/http-listening/listen-tls/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_examples/http-listening/listen-tls/main.go b/_examples/http-listening/listen-tls/main.go index 04b57de6..9fd84937 100644 --- a/_examples/http-listening/listen-tls/main.go +++ b/_examples/http-listening/listen-tls/main.go @@ -21,8 +21,8 @@ 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() + target, _ := url.Parse("https://127.0.0.1:443") + go host.NewRedirection("127.0.0.1:80", target, iris.StatusMovedPermanently).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"))