mirror of
https://github.com/astaxie/beego.git
synced 2025-06-21 09:00:18 +00:00
.github
cache
config
context
grace
httplib
logs
migration
orm
plugins
apiauth
auth
authz
cors
cors.go
cors_test.go
session
swagger
testdata
testing
toolbox
utils
validation
vendor
.gitignore
.gosimpleignore
.travis.yml
CONTRIBUTING.md
LICENSE
README.md
admin.go
admin_test.go
adminui.go
app.go
beego.go
config.go
config_test.go
controller.go
controller_test.go
doc.go
error.go
error_test.go
filter.go
filter_test.go
flash.go
flash_test.go
fs.go
go.mod
go.sum
hooks.go
log.go
mime.go
namespace.go
namespace_test.go
parser.go
policy.go
router.go
router_test.go
staticfile.go
staticfile_test.go
template.go
template_test.go
templatefunc.go
templatefunc_test.go
tree.go
tree_test.go
unregroute_test.go

Commitad65479
will cause "Method Not Allow" in preflight response when enable CORS plugin. The root cause is that CORS plugin didn't generate http output after applied commitad65479
, so the value of `ctx.ResponseWriter.Started` will be keep `false`, and then later filter chains will be go on to run when CORS filter finished. This path will both fix "Method Not Allow" and the original bug "multiple response.WriteHeader calls". Signed-off-by: Yunkai Zhang <qiushu.zyk@taobao.com>