简体   繁体   中英

How to off throttle in debug=true?

In Laravel in App/Http/Kernel exist such string:

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

How to off throttle when debug mode in ENV set true?

I'm afraid you cannot set this dynamically as of now in 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')

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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