Update the manifest start_url to point at index#1275
Closed
AdaRoseCannon wants to merge 1 commit into
Closed
Conversation
According to https://developer.mozilla.org/en-US/docs/Web/Manifest/start_url#Relative_URL the start_url, if a relative URL like '.', should point to a path relative to the manifest. After testing the install in Samsung Internet, this results in a broken link because it points to the folder containing the manifest: `localhost:8080/static-336ee288886f5728e1191e9ada2aeba5eb0bbd76/out/vs/server/src/media/` Where the expected behaviour is that it points to the root of the project. An alternative change would be to: '../../../../../../'
sr229
approved these changes
Jan 13, 2020
Member
|
Oh, nice catch. I assume `../../../../../../` would be better because
it's possible to host code-server at a path like `domain.com/vscode`?
|
Author
|
That would be the case, although setups like that i don't think are common since you lose the protections of running the 3rd party code on a subdomain. In addition it would be very fragile and break if you were to change the level of nesting. |
Author
|
An alternative would be to move the manifest.json to the root of the project and keep the '.' value for Although I wouldn't know the best way to do that for this project. |
Member
|
It's true that scenario isn't common and I agree that subdomains are
superior but we have users with that setup and I don't want to break
anything for them. :)
Serving the manifest at the root seems like a solid idea. That's
actually how it used to be then I removed it to use the generic asset
URL without realizing this would break. This time we'll add a comment
saying not to remove it because of the start_url, haha.
|
Author
|
That sounds like a good idea, i'll close this R then and open an issue. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
According to https://developer.mozilla.org/en-US/docs/Web/Manifest/start_url#Relative_URL
the start_url, if a relative URL like '.', should point to a path relative to the manifest.
After testing the install in Samsung Internet, this results in a broken link because it points to the folder containing the manifest:
localhost:8080/static-336ee288886f5728e1191e9ada2aeba5eb0bbd76/out/vs/server/src/media/Which is the correct behaviour, but the expected behaviour is that it points to the root of the project.
An alternative change would be to:
../../../../../../Describe in detail the problem you had and how this PR fixes it
After using
add to homescreenin Samsung Internet on Android the window is pointing at the wrong path.This fixes the issue by pointing to '/' instead of the manifest location '.'