-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: CDN support in middlewareModule
* chore: update sdk * chore: versioning * feat: default config for next * docs: changelog update * fix: default http client was not handling get requests * feat: reverse contamination from another branch * feat: add query parameters support * refactor: removed contamination from another branch * refactor and finalize cdnCacheBustingId feature * fix GET issue * remove docs * remove unused param --------- Co-authored-by: Wojciech Sikora <[email protected]>
- Loading branch information
1 parent
df2aa92
commit a815fd3
Showing
6 changed files
with
94 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@vue-storefront/sdk": patch | ||
--- | ||
|
||
[FIXED] support for `GET` requests in default HTTP client, which was throwing an error "SDKError: Request with GET/HEAD method cannot have body". Now, the client can handle `GET` requests properly. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
"@vue-storefront/sdk": major | ||
--- | ||
|
||
[ADDED] CDN support for the `middlewareModule`. | ||
Now, the module's configuration includes `cdnCacheBustingId` property, which allows you to set a unique identifier for the CDN cache busting. | ||
**The property is obligatory and must be a string.** | ||
|
||
```diff [sdk.config.ts] | ||
|
||
export const { getSdk } = createSdk( | ||
options, | ||
({ buildModule, middlewareModule, middlewareUrl, getRequestHeaders }) => ({ | ||
example: buildModule(middlewareModule<Endpoints>, { | ||
apiUrl: `${middlewareUrl}/test_integration`, | ||
+ cdnCacheBustingId: process.env.CDN_CACHE_BUSTING_ID, | ||
defaultRequestConfig: { | ||
headers: getRequestHeaders(), | ||
}, | ||
}), | ||
}) | ||
); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.