from master

Former-commit-id: 38143f9ea1230ac17a5a20fce0459b6ef3804d90
This commit is contained in:
Gerasimos (Makis) Maropoulos 2019-07-23 19:35:04 +03:00
parent 07690c7faa
commit 9ffb04e72d

View File

@ -21,8 +21,8 @@ func main() {
// to start a new server listening at :80 and redirects // to start a new server listening at :80 and redirects
// to the secure address, then: // to the secure address, then:
target, _ := url.Parse("https://127.0.1:443") target, _ := url.Parse("https://127.0.0.1:443")
go host.NewProxy("127.0.0.1:80", target).ListenAndServe() go host.NewRedirection("127.0.0.1:80", target, iris.StatusMovedPermanently).ListenAndServe()
// start the server (HTTPS) on port 443, this is a blocking func // 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")) app.Run(iris.TLS("127.0.0.1:443", "mycert.cert", "mykey.key"))