Repository navigation
修复在调用SetMethodNotAllowedHandle时修改StatusCode无效问题
Version 1.7.6
- Fix: 修复在调用SetMethodNotAllowedHandle时修改StatusCode无效问题
- Opt: 将路由阶段设置405代码逻辑移除,相关逻辑在DefaultMethodNotAllowedHandler实现
- About MethodNotAllowedHandle:
- 默认使用DefaultMethodNotAllowedHandler
- 如调用SetMethodNotAllowedHandle,则使用用户代码覆盖DefaultMethodNotAllowedHandler
- How to use SetMethodNotAllowedHandle:
app.SetMethodNotAllowedHandle(func(ctx dotweb.Context){
ctx.Redirect(301, "/")
})- 2019-11-10 00:00 at ShangHai