mirror of
https://github.com/astaxie/beego.git
synced 2025-06-11 12:40:40 +00:00
refact beego config
This commit is contained in:
@ -220,7 +220,7 @@ func Test_Preflight(t *testing.T) {
|
||||
func Benchmark_WithoutCORS(b *testing.B) {
|
||||
recorder := httptest.NewRecorder()
|
||||
handler := beego.NewControllerRegister()
|
||||
beego.RunMode = "prod"
|
||||
beego.BConfig.RunMode = "prod"
|
||||
handler.Any("/foo", func(ctx *context.Context) {
|
||||
ctx.Output.SetStatus(500)
|
||||
})
|
||||
@ -234,7 +234,7 @@ func Benchmark_WithoutCORS(b *testing.B) {
|
||||
func Benchmark_WithCORS(b *testing.B) {
|
||||
recorder := httptest.NewRecorder()
|
||||
handler := beego.NewControllerRegister()
|
||||
beego.RunMode = "prod"
|
||||
beego.BConfig.RunMode = "prod"
|
||||
handler.InsertFilter("*", beego.BeforeRouter, Allow(&Options{
|
||||
AllowAllOrigins: true,
|
||||
AllowCredentials: true,
|
||||
|
Reference in New Issue
Block a user