Socket
Socket
Sign inDemoInstall

@murasoftware/next-core

Package Overview
Dependencies
318
Maintainers
5
Versions
108
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.14 to 2.0.15

11

dist/index.modern.js

@@ -763,6 +763,7 @@ import { useEffect, useState, createContext } from 'react';

if (content.redirect) {
//match casing of nodeProxyRedirectCasing in mura.js
var hasResponseHeaders = typeof context.res.getHeaders != 'undefined'; //match casing of nodeProxyRedirectCasing in mura.js
//Don't set status code is cookies are coming. 30X will cause them to be ignored
//The browser will handle the redirect
var hasSetCookie = Object.keys(context.res.getHeaders()).findIndex(function (key) {
var hasSetCookie = hasResponseHeaders && Object.keys(context.res.getHeaders()).findIndex(function (key) {
return key.toLowerCase() == 'set-cookie';

@@ -772,3 +773,5 @@ }) > -1;

if (!hasSetCookie) {
context.res.setHeader('Location', content.redirect);
if (hasResponseHeaders) {
context.res.setHeader('Location', content.redirect);
}

@@ -782,3 +785,3 @@ if (content.statuscode) {

if (content.statuscode != 301) {
if (hasResponseHeaders && content.statuscode != 301) {
context.res.setHeader('Cache-Control', 'no-cache, no-store');

@@ -785,0 +788,0 @@ context.res.setHeader('Expires', 'Mon, 01 Jan 1990 00:00:00 GMT');

@@ -768,6 +768,7 @@ (function (global, factory) {

if (content.redirect) {
//match casing of nodeProxyRedirectCasing in mura.js
var hasResponseHeaders = typeof context.res.getHeaders != 'undefined'; //match casing of nodeProxyRedirectCasing in mura.js
//Don't set status code is cookies are coming. 30X will cause them to be ignored
//The browser will handle the redirect
var hasSetCookie = Object.keys(context.res.getHeaders()).findIndex(function (key) {
var hasSetCookie = hasResponseHeaders && Object.keys(context.res.getHeaders()).findIndex(function (key) {
return key.toLowerCase() == 'set-cookie';

@@ -777,3 +778,5 @@ }) > -1;

if (!hasSetCookie) {
context.res.setHeader('Location', content.redirect);
if (hasResponseHeaders) {
context.res.setHeader('Location', content.redirect);
}

@@ -787,3 +790,3 @@ if (content.statuscode) {

if (content.statuscode != 301) {
if (hasResponseHeaders && content.statuscode != 301) {
context.res.setHeader('Cache-Control', 'no-cache, no-store');

@@ -790,0 +793,0 @@ context.res.setHeader('Expires', 'Mon, 01 Jan 1990 00:00:00 GMT');

{
"name": "@murasoftware/next-core",
"version": "2.0.14",
"version": "2.0.15",
"description": "Core utilties for Mura.js and Next.js",

@@ -5,0 +5,0 @@ "author": "Mura Software",

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc