Skip to content
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

Client library does not work with CDNs that have strict requirements for the query string #12

Open
warpech opened this issue Oct 5, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@warpech
Copy link
Member

warpech commented Oct 5, 2021

I tried using the client library with frame assets hosted with CDNs skypack.dev and unpkg.com and they both have the same problem: Providing a custom query string (?svId=...) by client library results in an error or a 302 redirection.

The solution to this appears to be to use the hash (#) part of the URL instead of the search (?) part.

For that reason, I suggest that the URL parameters could be given either in the ?... part (ending at the URL end or the # character) or in the #... part.

Then we could rename the "Query String API" to "URL API". We could do it at once with https://github.com/handsontable/spreadsheet-viewer-dev/issues/942

@warpech warpech transferred this issue from another repository Oct 21, 2021
@warpech warpech transferred this issue from another repository Oct 21, 2021
warpech added a commit that referenced this issue Oct 22, 2021
use `#` instead of `?` to provide Query String API parameters for compatibility reasons with various HTTP server configurations, we store the parameters in the hash part of the URL - that's why they are after the # sign

Fixes: #12

POC is here: https://codesandbox.io/s/install-sv-from-a-cdn-vz6k5?file=/src/index.js

It works with Unpkg.com and Snowpack.dev CDNs, but the API change in the current PR needs some work to be done properly: changing function names, updating the docs, etc.
@AMBudnik AMBudnik added the enhancement New feature or request label Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants