Error "Shopify Remix Extension - API POST Call Not Working but Works on Admin Side"

Topic summary

A developer is encountering errors when making API POST calls from a Shopify Remix extension, receiving “No host provided” messages with 400 or 500 status codes. The same API calls work correctly on the admin side.

Key Issue:

  • Extension-side requests to https://viral-hms.myshopify.com/apps/proxy/notify fail with “Bad request” and “No host provided” errors
  • Admin-side requests using identical API URLs succeed

Diagnosis:
The error relates to the “host” parameter required by Shopify’s authentication middleware. The middleware expects different authentication processes for admin requests versus proxy requests from extensions.

Proposed Solution:

  • Use separate base paths for admin (/api) and proxy requests (/api_proxy/)
  • This prevents the admin authentication middleware from interfering with extension requests
  • Implement separate validation middleware for proxy-originated requests
  • Reference Shopify’s app-proxy authentication documentation for proper implementation

Status: The discussion remains open with a suggested architectural approach but no confirmed resolution yet.

Summarized with AI on October 30. AI used: claude-sonnet-4-5-20250929.

In the attached file indicated at the end:

" this is an error show "> “Request URL:”> “https://viral-hms.myshopify.com/apps/proxy/notify”> “Request Method:”> “POST”> “Status Code:”> “400 Bad Request”> “”> “Response”> “No host provided”

It seems that the URL configured to be proxied by Shopify is wrong or the destination address is not right.

I’d start checking those values.