Repository navigation
feat(deeplink): look up links on the workspace's link hosts, and name the app on every request - #9
Merged
Merged
Conversation
… the app on every request A URL is looked up on the server when it is an http(s) URL on the baseUrl host or, with appToken set, on one of the workspace's link hosts, learned from GET /api/sdk/v1/link-domains and saved for the next launch. A link handled before the first fetch waits for it, at most 3 seconds, when no list was saved. A 4xx forgets the list; a network or server error keeps it. With appToken set, every request carries the X-LinkForty-App-Token header, so a link lookup answers only with the app's own workspace's links.
|
🎉 This PR is included in version 1.7.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
What
A URL is looked up on the server when it is an
http(s)URL on thebaseUrlhost or, withappTokenset, on one of the workspace's link hosts: its link host label and verified custom domains.LinkDomainslearns the hosts fromGET /api/sdk/v1/link-domainsand saves them for the next launch. A link handled before the first fetch waits for it, at most 3 seconds, when no list was saved on an earlier launch.baseUrlhost only. A network or server error keeps what is known.appTokenset, every request carriesX-LinkForty-App-Token, so a link lookup answers only with the app's own workspace's links.appToken, the URLs looked up are those on thebaseUrlhost, as before. The host is compared rather than the URL prefix, sohttpandhttpsboth match.This matches iOS 1.7.0 and Android 1.6.0.
Tests
LinkDomains: hosts from the server, saved list, saved list kept on a 5xx, list forgotten on a 4xx, no fetch without a token, the 3-second wait, andhostOf.DeepLinkHandlerimportsreact-native, which the test runner cannot parse, so the host decision lives inLinkDomains, which is tested directly.