-
-
Notifications
You must be signed in to change notification settings - Fork 302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Hosting under a subpath will cause wrong URL being saved when adding to home screen on iPhone #329
Comments
Hey @terrytw If we remove the Can you please test the behavior when saving from your #about page? As an alternative, a stackoverflow thread supposes this relative path and scope combination: "start_url": "./"
"scope": "." Does this combination work for you? |
Thanks for the reply
I can't tell whether it saves
works the same as removing So for me either one is OK, but I don't really understands which is better because I don't know much about html...It's up to you:) |
Does it open the about page every time you launch the pwa? |
No, it does not show about page at all. |
Apparently, it does not matter, as the default behavior is to use the URL that links to the manifest.json is used, which is exactly |
Describe the bug
I have pairdrop hosted at this URL: https://mydomain.com/pairdrop
I used Caddy to reverse proxy pairdrop, and I use Caddy to strip /pairdrop from the URL transparently. Since all paths are already relative, it works, at least in a desktop browser.
When visiting https://mydomain.com/pairdrop using safari on my iPhone, the website works too, but problem ensues when I tried to save the page to a shortcut on the home screen. I can only save https://mydomain.com/, not https://mydomain.com/pairdrop
Upon further investigation, someone points to a possible reason:
https://www.reddit.com/r/react/comments/xkp3ue/add_to_home_screen_in_safari_saves_homepage_only/
He says it is because of start_url in manifest.json is pointing towards "/"
I guess 2 possible solution is to either remove start_url, or add an option "baseurl" so pairdrop is aware that it is served under a subpath thus modifying start_url as needed.
EDIT: I can confirm that by editing /home/node/app/public/manifest.json and removing "start_url", this problem is resolved.
Smartphone (please complete the following information):
Bug occurs on official PairDrop instance https://pairdrop.net/
No
Version: v1.10.10
Bug occurs on self-hosted PairDrop instance
Yes
Self-Hosted Setup
Proxy: Caddy
Deployment:
Version: v1.10.10
The text was updated successfully, but these errors were encountered: