1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-23 04:47:02 +00:00
Former-commit-id: 2c2c32afe31fe94543d145ab8c8475d7b4392ff1
This commit is contained in:
Gerasimos (Makis) Maropoulos
2018-11-09 03:03:48 +02:00
parent 75ead88483
commit e08d0b4be6
19 changed files with 158 additions and 33 deletions

View File

@@ -44,5 +44,11 @@ func main() {
})
}
app.Run(iris.Addr(":80"))
// iris.WithoutPathCorrectionRedirection | iris#Configuration.DisablePathCorrectionRedirection:
// CORS needs the allow origin headers in the redirect response as well, we have a solution for this:
// If you use iris >= v11.0.4 then add the `app.Run(..., iris.WithoutPathCorrectionRedirection)`
// on the server side if you wish
// to directly fire the handler instead of redirection (which is the default behavior)
// on request paths like "/v1/mailer/" when "/v1/mailer" route handler is registered.
app.Run(iris.Addr(":80"), iris.WithoutPathCorrectionRedirection)
}