1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-23 00:20:55 +00:00

Merge pull request #928 from lei-cao/develop

Return the response directly if it's a options PreflightHeader request
This commit is contained in:
astaxie 2014-11-21 23:22:59 +08:00
commit 0ad75cb5fa

View File

@ -217,6 +217,7 @@ func Allow(opts *Options) beego.FilterFunc {
ctx.Output.Header(key, value) ctx.Output.Header(key, value)
} }
ctx.Output.SetStatus(http.StatusOK) ctx.Output.SetStatus(http.StatusOK)
ctx.WriteString("")
return return
} }
headers = opts.Header(origin) headers = opts.Header(origin)