Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Closed
ThomasLandauer opened this issue Jun 7, 2020 · 5 comments
Closed

Add option to disable welcome page #37129

ThomasLandauer opened this issue Jun 7, 2020 · 5 comments

Comments

@ThomasLandauer
Copy link
Contributor

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

@ro0NL
Copy link
Contributor

ro0NL commented Jun 7, 2020

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?

@Tobion
Copy link
Contributor

Tobion commented Jun 7, 2020

Closing as the debug mode is already preventing "probing /" as explained.

@Tobion Tobion closed this as completed Jun 7, 2020
ThomasLandauer added a commit to ThomasLandauer/symfony-docs that referenced this issue Jun 7, 2020
@ThomasLandauer
Copy link
Contributor Author

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.

@yceruto
Copy link
Member

yceruto commented Jun 7, 2020

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

@ThomasLandauer
Copy link
Contributor Author

fabpot added a commit that referenced this issue Jun 8, 2020
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants