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
requestWithoutTrailingSlash on CompiledRouteCollection cause base URL "/" to not work if laravel public folder is linked through api symlink in html folder #56682
In the main html folder i have a symbolic link "api" linked to "public" laravel folder. This because in the main html folder i have the compiled angular UI.
I have a route based on the base API URL (apiPrefix = ''): Route::get('/', ...)
If I use route:cache, the Request URL in the CompiledRouteCollection is cleaned of / via requestWithoutTrailingSlash. This causes the API to return: The GET method is not supported for route /.
Without route:cache, it works.
Steps To Reproduce
Steps To Reproduce
Run php artisan route:cache
Open a web browser locally with a URL that includes a subpath, using one of the following methods:
Create a symlink named api pointing to the public Laravel folder, then open http://localhost/api/ (my case)
The important thing is that there is a subpath in the URL.