Closed mgill404 closed 9 months ago
To add some additional context, I think I don't always want the bridge fetch behavior to be removed. It is helpful when routing within my application as I will need to authenticate the requests.
I would like to be able to opt-out of it in the circumstance that I'm connecting to AWS. I'm scared this isn't possible.
I decided to just make the call on the server side.
I'm trying to disable fetch in my project, which I started with shopify/app
The Resource Fetching documentation alludes to this being possible. I am trying to do this as I am trying to make authenticated calls to AWS, and I need my own Auth header for this.
I have found some hints about how to do this, but can't put the pieces together.
In #239 I found an example, so I tried adding the meta tag to root.jsx
I've also tried the other approach in #239 by setting the shopify object in entry.client.js I believe this is not happening early enough, but I don't know how to make it happen earlier than this.
Neither of these approaches have fixed my issues. I continue to see in the Network Developer Chrome tool that fetch calls are routed through app-bridge.js
To Reproduce
Steps to reproduce the behaviour:
If applicable, add screenshots to help explain your problem.
Expected behaviour
I would expect to use the default fetch API available in the browser. The actual behavior is that I'm using a fetch API provided by App Bridge.
Contextual information
The fetch call is being made to access a lambda on AWS. I am using client-lambda which makes the fetch.
Packages and versions
These are all the shopify packages listed in package-lock.json
"@shopify/app": "3.50.2", "@shopify/app-bridge-types": "^0.0.3", "@shopify/cli": "3.50.2", "@shopify/polaris": "^12.0.0", "@shopify/shopify-api": "^8.0.2", "@shopify/shopify-app-remix": "^2.1.0", "@shopify/shopify-app-session-storage-prisma": "^2.0.0",
Platform