Socket
Socket
Sign inDemoInstall

pagexray

Package Overview
Dependencies
Maintainers
3
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pagexray - npm Package Compare versions

Comparing version 4.3.1 to 4.4.0

5

lib/collect.js

@@ -46,3 +46,6 @@ 'use strict';

const request = entry.request;
const contentType = util.getContentType(response.content.mimeType);
const contentType = util.getContentType(
response.content.mimeType,
request.url
);
const content =

@@ -49,0 +52,0 @@ response.content && response.content.text ? response.content.text : '';

20

lib/util.js

@@ -28,2 +28,10 @@ 'use strict';

const FILE_ENDINGS_MATCHERS = [
[/\.woff$/, 'font'],
[/\.woff2$/, 'font'],
[/\.eot$/, 'font'],
[/\.ttf$/, 'font'],
[/.*/, 'other'] // Always
];
/**

@@ -39,5 +47,11 @@ * Utilities for getting content from HAR:s.

*/
getContentType: mimeType =>
MIME_TYPE_MATCHERS.find(matcher => matcher[0].test(mimeType))[1],
getContentType: (mimeType, url) => {
let type = MIME_TYPE_MATCHERS.find(matcher => matcher[0].test(mimeType))[1];
// Hack for woff that has mimetype application/octet-stream and others
if (type === 'other') {
return FILE_ENDINGS_MATCHERS.find(matcher => matcher[0].test(url))[1];
} else {
return type;
}
},
getHTTPVersion: version => {

@@ -44,0 +58,0 @@ if (version === 'h2' || version === 'HTTP/2.0') {

{
"name": "pagexray",
"version": "4.3.1",
"version": "4.4.0",
"description": "Xray your HAR file and know all about the page",

@@ -5,0 +5,0 @@ "keywords": [

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