Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/content/4.sdk/2.getting-started/2.middleware-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ The `middlewareModule` accepts the following options:
- `defaultRequestConfig` - (Optional) default request config for each request,
- `httpClient` - (Optional) a custom HTTP client,
- `errorHandler` - (Optional) a custom error handler for HTTP requests.
- `cdnCacheBustingId` - (Optional) a middleware version identifier that will be attached to all `GET` requests for the sake of bypassing the CDN cache stored for a different version of the middleware. [See guide about caching middleware responses here.](/storefront/features/cdn/caching-api-responses)

Example configuration:

Expand All @@ -150,6 +151,7 @@ export const sdk = initSDK({
errorHandler: ({ error, methodName, url, params, config, httpClient }) => {
// Custom error handler
},
cdnCacheBustingId: // git commit hash of the monorepo where both middleware and the storefront are located
}),
});
```
Expand Down