from master
@@ -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"))
