Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Retain host parameter #808

Conversation

stevesweets
Copy link
Contributor

Hoping I haven't done unintended here. I'm sure someone will tell me if I have.

Removed host parameter from filter. AppBridge 2 requires this parameter to be set in initialisation, so having it on the url is very useful.

I bumped to 2.0.3 for this:

package.json

"dependencies": {
    "@shopify/app-bridge": "^2.0.3",
    "@shopify/app-bridge-react": "^2.0.3",
    "@shopify/app-bridge-utils": "^2.0.3"
...

As the host parameter is now available on the url, it could be placed on the blade template for my SPA

<input type="hidden" id="host" value="{{ \Request::get('host') }}" />

And included by my top js.

...
const config = {
    host: document.getElementById("host").value,
    ...
}

Remove host parameter from filter;

AppBridge 2 requires this parameter to be set in initialisation, so having it on the url is very useful.
@gnikyt gnikyt merged commit 2789c40 into gnikyt:feature/cookieless Jun 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants