You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've encountered what seems to be unexpected behavior regarding the preventRequestsDuringMaintenance middleware.
In my bootstrap/app.php file, I've configured it as follows to define URLs that should always be accessible during maintenance:
However, it appears that the DownCommand doesn't honor the paths defined this way. Instead of using the configuration provided in bootstrap/app.php for the core Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance class, Laravel seems to attempt to resolve and use an App\Http\Middleware\PreventRequestsDuringMaintenance class, even if this class doesn't exist in the application.
To get the desired behavior, I had to create the following child class:
I couldn't find any mention of this specific behavior or requirement in the documentation.
Could you please clarify if this is intended behavior, or if it might be a bug? Perhaps there's a reason for this design that I'm not aware of.
Thanks for your time and help!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hey
I've encountered what seems to be unexpected behavior regarding the
preventRequestsDuringMaintenance
middleware.In my
bootstrap/app.php
file, I've configured it as follows to define URLs that should always be accessible during maintenance:However, it appears that the
DownCommand
doesn't honor the paths defined this way. Instead of using the configuration provided inbootstrap/app.php
for the coreIlluminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance class
, Laravel seems to attempt to resolve and use anApp\Http\Middleware\PreventRequestsDuringMaintenance class
, even if this class doesn't exist in the application.To get the desired behavior, I had to create the following child class:
I couldn't find any mention of this specific behavior or requirement in the documentation.
Could you please clarify if this is intended behavior, or if it might be a bug? Perhaps there's a reason for this design that I'm not aware of.
Thanks for your time and help!
Beta Was this translation helpful? Give feedback.
All reactions