• Yunkai Zhang's avatar
    Fix regression caused by commit ad654793 · e3810b59
    Yunkai Zhang authored
    Commit ad654793 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
    commit ad654793, 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: 's avatarYunkai Zhang <qiushu.zyk@taobao.com>
    e3810b59
Name
Last commit
Last update
..
cors.go Loading commit data...
cors_test.go Loading commit data...