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

Config option to turn off demo route #1206

Open
Samvdg opened this issue Jan 9, 2024 · 1 comment
Open

Config option to turn off demo route #1206

Samvdg opened this issue Jan 9, 2024 · 1 comment
Labels
enhancement Optimization for existing features.

Comments

@Samvdg
Copy link

Samvdg commented Jan 9, 2024

It's a bit annoying to have an extra page available on your website that's more for admins to test. Not just for users.
And adding a new route redirecting to an error for only this route seems unnecessary when we have a nice option to just create a boolean in the config file. It seems like it SHOULD be a functionality already instead of having to manually add this yourself

If you could add a config variable named 'demo_page_on' or something alike which is standard on true, that'd be great

Using Route::get('/demo', fn() => abort(418)); works fine after loading your routes but it would be more clean to just have a config option

@streamtw
Copy link
Member

Agreed. This route was set as default enabled to provide a quick way to verify if installation is successful, for developers who are new to this package. But I agree that add a config or simply add some documentation will also do, since the demo page should not be accessed in production.

@streamtw streamtw added the enhancement Optimization for existing features. label Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Optimization for existing features.
Projects
None yet
Development

No branches or pull requests

2 participants