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

@netlify/ipx

Package Overview
Dependencies
Maintainers
18
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@netlify/ipx - npm Package Compare versions

Comparing version 1.4.2 to 1.4.3-alpha-waf-logging-0.0.0

11

dist/index.js

@@ -62,10 +62,14 @@ "use strict";

const isLocal = !id.startsWith('http://') && !id.startsWith('https://');
const wafBypassTokenHeader = event.headers[WAF_BYPASS_TOKEN_HEADER];
if (wafBypassTokenHeader) {
console.log('WAF bypass token found');
}
if (isLocal) {
// This header is available to all lambdas that went through WAF
// We need to add it for local images (origin server) to be able to bypass WAF
if (event.headers[WAF_BYPASS_TOKEN_HEADER]) {
if (wafBypassTokenHeader) {
// eslint-disable-next-line no-console
console.log(`WAF bypass token found, setting ${WAF_BYPASS_TOKEN_HEADER} header to load source image`);
console.log(`Setting ${WAF_BYPASS_TOKEN_HEADER} header to load source image`);
requestHeaders[WAF_BYPASS_TOKEN_HEADER] =
event.headers[WAF_BYPASS_TOKEN_HEADER];
wafBypassTokenHeader;
}

@@ -133,2 +137,3 @@ const url = new URL(event.rawUrl);

}
console.log(`headers being sent to loadSourceImage: ${Object.keys(requestHeaders).join(', ')}`);
const { response, cacheKey, responseEtag, finalize } = await loadSourceImage({

@@ -135,0 +140,0 @@ cacheDir,

{
"name": "@netlify/ipx",
"version": "1.4.2",
"version": "1.4.3-alpha-waf-logging-0.0.0",
"description": "on-demand image optimization for Netlify",

@@ -5,0 +5,0 @@ "repository": "netlify/netlify-ipx",

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