Closed tuanda-mh closed 2 months ago
please help
I used the following url to send my request: app-url/route
Sorry, I misunderstood your last question!
I think the problem might be that in development, your request will hit the frontend vite server first, so you'll need to add a proxy for the route you're using.
Probably something like this in your vite.config file:
proxy: {
"^/(\\?.*)?$": proxyOptions,
"^/api(/|(\\?.*)?$)": proxyOptions,
+ "^/route(/|(\\?.*)?$)": proxyOptions,
},
Hope this helps!
this solved my issue, thank you very much
Happy to hear that, sorry for the confusion :)
Closing the issue then!
Hi, when I created this issue earlier, you guys told me to add my route before the line: app.use("/api/*", shopify.validateAuthenticatedSession()); and it will work. But when I did that and sent the request via Postman, it still returned this:
<!DOCTYPE html>