Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excluded routes are not respected in maintenance mode, in case of custom template #38038

Closed
GeoSot opened this issue Jul 16, 2021 · 2 comments · Fixed by #38041
Closed

Excluded routes are not respected in maintenance mode, in case of custom template #38038

GeoSot opened this issue Jul 16, 2021 · 2 comments · Fixed by #38041
Assignees

Comments

@GeoSot
Copy link
Contributor

GeoSot commented Jul 16, 2021

  • Laravel Version: 8.48.1
  • PHP Version: 7.4
  • Database Driver & Version: N/A

Description:

While being in maintenance mode having a custom template, the excluded URIs are not served.

It works fine in case of template = null

Steps To Reproduce:

  • Go to ->App\Http\Middleware\PreventRequestsDuringMaintenance
  • Set some internal URIs to $exceptproperty
  • Write on cli artisan down --render={any template} and visit the excluded URls
  • You will still see the custom template

In opposite case, if you write on cli artisan down (without render option) and visit the excluded URls, they will be served

Info: the issue seems to be on:

@driesvints
Copy link
Member

Thanks for reporting. Managed to reproduce this one but the way I see it is that this is intended from how things work. The framework is never booted when a custom template is set so the exclude array cannot be reached.

I do think it's possible to solve this by adding the exclude list to the down file so it can be checked in the maintenance.php file.

Gonna wait for @taylorotwell's reply.

@driesvints
Copy link
Member

I sent in a PR here: #38041

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants