Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
MM-14052: Fix subpath rewrite again #10252
The subpath rewrite feature broke in v5.8, as the
This PR fixes the regular expressions used to match the current value of the CSP directive. Note that we can't fix this at build time, since the rewrite occurs on server startup and is driven by the SiteURL. We could avoid some of this pain if we hard-coded an extra XHR request on startup to fetch the subpath assets location, but this is non-trivial and needlessly slows down all installations for a relatively minor pain that has always been caught in QA.
This PR also adds a missing log that would have immediately revealed the failure instead of requiring spelunking in the server itself.
Open to suggestions for removing the brittleness!
deanwhillier left a comment
Upon further discussion, we need to update the subpath functionality to account for favicon paths that are now embedded in the root.html template file.
Relevant lines in root.html (17-19):