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

bfn-proxy

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bfn-proxy - npm Package Compare versions

Comparing version 1.4.3 to 1.4.5

3

lib/api-run.js

@@ -6,5 +6,2 @@ 'use strict'

// https://hopscotch-app.herokuapp.com/api/1/run.json?id=23&exec='bash -c "/app/misc/convert_video.sh https://static.bluefidelity.com/_usr/3b62f078-3864-4326-a7f2-c098c836a2c4.mp4 https://bfs.nyc3.digitaloceanspaces.com/_tmp/test111.mp4?AWSAccessKeyId=TN4AFUZI3HHWMPTNYSKE&Cache-Control=public%2C%20max-age%3D315360000&Content-Type=video%2Fmp4&Expires=1652995019&Signature=zcFlEWf5ZzoOcmOfjPv3Lb%2BsHoc%3D&x-amz-acl=public-read"'
// https://hopscotch-app.herokuapp.com/api/1/run.json?id=31103&exec=bash%20-c%20%22%2Fapp%2Fmisc%2Fconvert_video.sh%20https%3A%2F%2Fstatic.bluefidelity.com%2F_usr%2F3b62f078-3864-4326-a7f2-c098c836a2c4.mp4%20https%3A%2F%2Fbfs.nyc3.digitaloceanspaces.com%2F_tmp%2Ftest111.mp4%3FAWSAccessKeyId%3DTN4AFUZI3HHWMPTNYSKE%26Cache-Control%3Dpublic%252C%2520max-age%253D315360000%26Content-Type%3Dvideo%252Fmp4%26Expires%3D1652995019%26Signature%3DzcFlEWf5ZzoOcmOfjPv3Lb%252BsHoc%253D%26x-amz-acl%3Dpublic-read%22
function resEndJSON(res,status,s) {

@@ -11,0 +8,0 @@ s = new Buffer(JSON.stringify(s), 'utf8');

11

lib/bfn-proxy.js

@@ -10,2 +10,3 @@ 'use strict'

var doRUN = require('./api-run')
var parseURL = url.parse

@@ -18,4 +19,10 @@ module.exports = function (opts) {

return function (request, response) {
if (opts.enableRSS && /^\/?api\/1\/rss\.json\?/.test(request.url)) return doRSS(request, response)
if (opts.enableRUN && /^\/?api\/1\/run\.json\?/.test(request.url)) return doRUN(request, response)
if ('/api/' === request.url.substring(0, 5)) {
if (opts.requireKey) {
var query = parseURL(request.url, true).query
if (opts.requireKey !== query.key) return res404(response)
}
if (opts.enableRSS && /^\/?api\/1\/rss\.json\?/.test(request.url)) return doRSS(request, response)
if (opts.enableRUN && /^\/?api\/1\/run\.json\?/.test(request.url)) return doRUN(request, response)
}
var uriMatch = request.url.match('^/?(?://(https?):)?/?(/[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}/.*)$')

@@ -22,0 +29,0 @@ var setReferer = null

{
"name": "bfn-proxy",
"version": "1.4.3",
"version": "1.4.5",
"description": "HTTP request proxy middleware for node.js",

@@ -5,0 +5,0 @@ "author": "Blue Fidelity Inc. (https://www.bluefidelity.com/)",

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