NewProxy no work

NewProxy no work

Former-commit-id: 01923793abb91d5c9ce661136f5f02e1ba0a3b2c
This commit is contained in:
roamboy 2019-07-16 13:37:53 +08:00 committed by GitHub
parent 85b1f6fc24
commit 78e5e6d626

View File

@ -22,7 +22,7 @@ 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.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 // 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"))