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

arc-reply

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arc-reply - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

4

index.js

@@ -52,7 +52,7 @@ const objectToCookie = (obj) => {

module.exports.redirect = (location, options) => {
module.exports.redirect = (location, options = {}) => {
const response = setResponse(options);
response.headers = Object.assign({ Location: location }, response.headers);
response.statusCode = options.type === 'permanent' ? 301 : 302;
response.statusCode = options.type === 'temporary' ? 302 : 301;
return response;
};
{
"name": "arc-reply",
"version": "2.0.0",
"version": "2.1.0",
"description": "helper library that simplifies HTTP responses from arc/lambda",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -72,3 +72,3 @@ const tap = require('tap');

tap.test('redirect', t => {
const perm = reply.redirect('https://google.com', { type: 'permanent' });
const perm = reply.redirect('https://google.com');
const temp = reply.redirect('https://google.com', { type: 'temporary' });

@@ -75,0 +75,0 @@ t.match(perm, {

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