[WebProfilerBundle] modified url generation to use absolute urls #37576
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TODO
Use case
The web debug toolbar ajax calls are broken in the case when you have to work with a page template that uses HTML
<base>
Tag for whatever reason.In this case, the ajax calls of the debug toolbar will target that base url, as these urls are rendered as relative urls in the injected toolbar HTML content.
A simple solution for this issue is to generate absolute urls for these calls - this is my first approach in this PR.
A more complex solution would be a configurable behavior with the current method as the default.
I believe though that the simple solution is enough here, as it will result in the same requests for developers using templates without any
<base>
tag, and it will also make the dev toolbar usable for my case (using a<base>
tag).(Please let me know if I should make this PR against another branch.)