Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@commercetools/frontend-sdk

Package Overview
Dependencies
Maintainers
2
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commercetools/frontend-sdk - npm Package Compare versions

Comparing version 1.7.5 to 1.7.6

lib/chunk-5OOJZRKU.mjs

7

CHANGELOG.md
## 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc