Socket
Socket
Sign inDemoInstall

serve-handler

Package Overview
Dependencies
18
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.1.1 to 3.1.2

2

package.json
{
"name": "serve-handler",
"version": "3.1.1",
"version": "3.1.2",
"description": "The routing foundation of `serve` and static deployments on Now",

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

@@ -98,2 +98,4 @@ // Native

const ensureSlashStart = target => (target.startsWith('/') ? target : `/${target}`);
const shouldRedirect = (decodedPath, {redirects = [], trailingSlash}, cleanUrl) => {

@@ -138,3 +140,3 @@ const slashing = typeof trailingSlash === 'boolean';

return {
target,
target: ensureSlashStart(target),
statusCode: defaultType

@@ -147,3 +149,3 @@ };

return {
target: decodedPath,
target: ensureSlashStart(decodedPath),
statusCode: defaultType

@@ -150,0 +152,0 @@ };

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc