@commercetools/frontend-sdk
Advanced tools
Comparing version 1.7.5 to 1.7.6
## Version 1.7.6 (2023-04-26) | ||
* fix: include headers from IncomingMessage on SSR fetch | ||
## Version 1.7.5 (2023-04-25) | ||
* Updated version | ||
* Added ServerOption support for getPreview and getPages methods | ||
@@ -7,0 +10,0 @@ |
@@ -171,2 +171,5 @@ "use strict"; | ||
const sessionCookie = getCookie("frontastic-session", serverOptions) ?? ""; | ||
const incomingHeaders = serverOptions?.req ? { ...serverOptions.req.headers } : {}; | ||
delete incomingHeaders["host"]; | ||
delete incomingHeaders["cookie"]; | ||
options.headers = { | ||
@@ -177,3 +180,4 @@ "Content-Type": "application/json", | ||
...options.headers || {}, | ||
...sessionCookie ? { "Frontastic-Session": sessionCookie } : {} | ||
...sessionCookie ? { "Frontastic-Session": sessionCookie } : {}, | ||
...incomingHeaders | ||
}; | ||
@@ -180,0 +184,0 @@ const response = await fetch(url, options); |
@@ -191,2 +191,5 @@ "use strict"; | ||
const sessionCookie = getCookie("frontastic-session", serverOptions) ?? ""; | ||
const incomingHeaders = serverOptions?.req ? { ...serverOptions.req.headers } : {}; | ||
delete incomingHeaders["host"]; | ||
delete incomingHeaders["cookie"]; | ||
options.headers = { | ||
@@ -197,3 +200,4 @@ "Content-Type": "application/json", | ||
...options.headers || {}, | ||
...sessionCookie ? { "Frontastic-Session": sessionCookie } : {} | ||
...sessionCookie ? { "Frontastic-Session": sessionCookie } : {}, | ||
...incomingHeaders | ||
}; | ||
@@ -200,0 +204,0 @@ const response = await fetch(url, options); |
@@ -171,2 +171,5 @@ "use strict"; | ||
const sessionCookie = getCookie("frontastic-session", serverOptions) ?? ""; | ||
const incomingHeaders = serverOptions?.req ? { ...serverOptions.req.headers } : {}; | ||
delete incomingHeaders["host"]; | ||
delete incomingHeaders["cookie"]; | ||
options.headers = { | ||
@@ -177,3 +180,4 @@ "Content-Type": "application/json", | ||
...options.headers || {}, | ||
...sessionCookie ? { "Frontastic-Session": sessionCookie } : {} | ||
...sessionCookie ? { "Frontastic-Session": sessionCookie } : {}, | ||
...incomingHeaders | ||
}; | ||
@@ -180,0 +184,0 @@ const response = await fetch(url, options); |
{ | ||
"name": "@commercetools/frontend-sdk", | ||
"version": "1.7.5", | ||
"version": "1.7.6", | ||
"license": "UNLICENSED", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
248602
3381