Skip to content

Commit dfa63a1

Browse files
committed
Avoid proxying checkout temporarily
1 parent c5b7a69 commit dfa63a1

File tree

1 file changed

+5
-3
lines changed
  • packages/theme/src/cli/utilities/theme-environment

1 file changed

+5
-3
lines changed

packages/theme/src/cli/utilities/theme-environment/proxy.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,11 @@ function patchProxiedResponseHeaders(ctx: DevServerContext, event: H3Event, resp
201201
const locationHeader = response.headers.get('Location')
202202
if (locationHeader) {
203203
const url = new URL(locationHeader, 'https://shopify.dev')
204-
url.searchParams.delete('_fd')
205-
url.searchParams.delete('pb')
206-
setResponseHeader(event, 'Location', url.href.replace(url.origin, ''))
204+
if (!CHECKOUT_PATTERN.test(url.pathname)) {
205+
url.searchParams.delete('_fd')
206+
url.searchParams.delete('pb')
207+
setResponseHeader(event, 'Location', url.href.replace(url.origin, ''))
208+
}
207209
}
208210

209211
// Cookies are set for the vanity domain, fix it for localhost:

0 commit comments

Comments
 (0)