GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
When the application is not at the root of the domain, the path used by the sandbox is wrong. And as the path is a DIC parameter, it is impossible to provide a setup using the current request to determine the base path as it would require knowing the base path when building the container. So the default value is simply broken.
@stof Unable to reproduce that or I am misunderstanding.
I'm currently using Nelmio in /api/ instead of / and the sandbox functionality works fine.
@ckdarby I'm not talking about putting the api depper than the root of the app. I'm talking about putting the root of the app deeper than the domain root, for instance http://localhost/test_app/web/ to access the / path in the app.
When using the Request object, this can be determined as $request->getBaseUrl() (or $request->getBasePath() to access assets which should not go through app.php. they might be different when you don't have mod_rewrite) but the DIC parameter cannot be set according to the request