简体   繁体   English

如何在debug = true中放开速度?

[英]How to off throttle in debug=true?

In Laravel in App/Http/Kernel exist such string: 在App / Http / Kernel中的Laravel中存在这样的字符串:

protected $middlewareGroups = [
    'api' => [
        'throttle:60,1',
        'bindings',
    ],
];

How to off throttle when debug mode in ENV set true? 当ENV中的调试模式设置为true时,如何节流?

I'm afraid you cannot set this dynamically as of now in Laravel.' 恐怕您现在还无法在Laravel中动态设置此设置。”

However what you can do is to define your own throttling middleware and then you can assign the throttle values dynamically. 但是,您可以做的是定义自己的节流中间件,然后可以动态分配节流值。

Note: You can fetch the debug config like so: 注意:您可以这样获取调试配置:

config('app.debug')

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM