mirror of
https://github.com/kataras/iris.git
synced 2025-02-02 23:40:35 +01:00
from master
Former-commit-id: 38143f9ea1230ac17a5a20fce0459b6ef3804d90
This commit is contained in:
parent
07690c7faa
commit
9ffb04e72d
|
@ -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"))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user