1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 18:37:05 +00:00
This commit is contained in:
Makis Maropoulos
2016-05-31 11:05:42 +03:00
parent c26668a489
commit 31cbd50fb0
18 changed files with 177 additions and 67 deletions

View File

@@ -221,10 +221,12 @@ func DefaultCors() *Cors {
return Default()
}
// Conflicts used by the router optimizer
func (c *Cors) Conflicts() string {
return "httpmethod"
}
// Serve serves the middleware
func (c *Cors) Serve(ctx *iris.Context) {
if ctx.MethodString() == "OPTIONS" {
c.logf("Serve: Preflight request")