[FIX] Autoupdate of CSS does not work when using a prefix #8107
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.
@RocketChat/core
Closes #ISSUE_NUMBER
When running RC with a prefix URL, in https://github.com/RocketChat/Rocket.Chat/blob/develop/packages/autoupdate/autoupdate_client.js#L84, if you hit only the first path RC will fail to load the CSS because the url prefix is duplicated and it receives the HTML of a 404 instead of the CSS.
I was not able to reproduce it the in the current develop branch because the second path is also hit which reloads the page. However, I was able to reproduce it my custom build of RC.
Since in the newer versions of Meteor the
ROOT_URL_PATH_PREFIX
is prefixed by default (https://github.com/meteor/meteor/blob/devel/packages/webapp/webapp_server.js#L41) this change justsyncs with the client file in the meteor package https://github.com/meteor/meteor/blob/87681c8f166641c6c3e34958032a5a070aa2d11a/packages/autoupdate/autoupdate_client.js