-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Add option to disable welcome page #37129
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
Comments
what if we only show the welcome page, when no routes are configured? 🤔 edit; actually the welcome page is already guarded using the debug setting, is it an issue? |
Closing as the debug mode is already preventing "probing /" as explained. |
Thanks! I explained this in the docs for https://symfony.com/doc/4.4/reference/configuration/framework.html#debug - see symfony/symfony-docs#13772 I'm not sure if it also applies to Symfony 3.4, so I targeted 4.4. |
Yes, it applies to Symfony 3.4 also |
For Symfony 3.4 it's already explained: https://github.com/symfony/symfony/blob/3.4/src/Symfony/Component/HttpKernel/Resources/welcome.html.php#L65 |
This PR was squashed before being merged into the 4.4 branch. Discussion ---------- Update welcome.html.php Added info about `kernel.debug` - see symfony/symfony-docs#13772 (comment) which is a follow-up of #37129 | Q | A | ------------- | --- | Branch? | 4.4. No need to change 3.4, since it's already present: https://github.com/symfony/symfony/blob/3.4/src/Symfony/Component/HttpKernel/Resources/welcome.html.php#L65 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | Fix #37129 | License | MIT | Doc PR | not necessary Commits ------- 53491b9 Update welcome.html.php
Description
Add an option to disable the special 404 error page ("Welcome to Symfony!") which is shown on
/
when you haven't configured any home page yourself.Reason: When creating an API, you might not have a "home" route. And you might not want to reveal any information when somebody probes
/
.Example
show_welcome
somewhere (framework.yaml
?) with default valuetrue
if
to Symfony\Component\HttpKernel\EventListener::onKernelException()The text was updated successfully, but these errors were encountered: