Skip to content

Commit 6d91665

Browse files
committed
Rename proxyStorefrontApiRequests to proxyStandardRoutes
Aligns the parameter name with PR #3309 for consistency.
1 parent 99214a0 commit 6d91665

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

packages/hydrogen/src/createRequestHandler.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ type CreateRequestHandlerOptions<Context = unknown> = {
3636
* the proxy works if you rely on Hydrogen's built-in behaviors such as analytics.
3737
* @default true
3838
*/
39-
proxyStorefrontApiRequests?: boolean;
39+
proxyStandardRoutes?: boolean;
4040
};
4141

4242
/**
@@ -48,7 +48,7 @@ export function createRequestHandler<Context = unknown>({
4848
poweredByHeader = true,
4949
getLoadContext,
5050
collectTrackingInformation = true,
51-
proxyStorefrontApiRequests = true,
51+
proxyStandardRoutes = true,
5252
}: CreateRequestHandlerOptions<Context>) {
5353
const handleRequest = createRemixRequestHandler(build, mode);
5454

@@ -86,7 +86,7 @@ export function createRequestHandler<Context = unknown>({
8686
context as {storefront?: StorefrontForProxy} | undefined
8787
)?.storefront;
8888

89-
if (proxyStorefrontApiRequests) {
89+
if (proxyStandardRoutes) {
9090
if (!storefront) {
9191
// TODO: this should throw error in future major version
9292
warnOnce(
@@ -104,7 +104,7 @@ export function createRequestHandler<Context = unknown>({
104104

105105
const response = await handleRequest(request, context);
106106

107-
if (storefront && proxyStorefrontApiRequests) {
107+
if (storefront && proxyStandardRoutes) {
108108
if (collectTrackingInformation) {
109109
storefront.setCollectedSubrequestHeaders(response);
110110
}

packages/remix-oxygen/src/server.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ type CreateRequestHandlerOptions<Context = unknown> = {
7171
* the proxy works if you rely on Hydrogen's built-in behaviors such as analytics.
7272
* @default true
7373
*/
74-
proxyStorefrontApiRequests?: boolean;
74+
proxyStandardRoutes?: boolean;
7575
};
7676

7777
export function createRequestHandler<Context = unknown>({
@@ -80,7 +80,7 @@ export function createRequestHandler<Context = unknown>({
8080
poweredByHeader = true,
8181
getLoadContext,
8282
collectTrackingInformation = true,
83-
proxyStorefrontApiRequests = true,
83+
proxyStandardRoutes = true,
8484
}: CreateRequestHandlerOptions<Context>) {
8585
const handleRequest = createRemixRequestHandler(build, mode);
8686

@@ -118,7 +118,7 @@ export function createRequestHandler<Context = unknown>({
118118
context as {storefront?: StorefrontForProxy} | undefined
119119
)?.storefront;
120120

121-
if (proxyStorefrontApiRequests) {
121+
if (proxyStandardRoutes) {
122122
if (!storefront) {
123123
// TODO: this should throw error in future major version
124124
warnOnce(
@@ -145,7 +145,7 @@ export function createRequestHandler<Context = unknown>({
145145

146146
const response = await handleRequest(request, context);
147147

148-
if (storefront && proxyStorefrontApiRequests) {
148+
if (storefront && proxyStandardRoutes) {
149149
if (collectTrackingInformation) {
150150
storefront.setCollectedSubrequestHeaders(response);
151151
}

0 commit comments

Comments
 (0)