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

oauth_reverse_proxy

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oauth_reverse_proxy - npm Package Compare versions

Comparing version 0.9.10 to 0.9.11

28

index.js

@@ -12,7 +12,6 @@ /**

var oauth_reverse_proxy = require('./lib');
var logger = require('./lib/logger.js').getLogger();
/**
* The config path can be provided as an environemnt variable. If not rpvoided, we chose
* sane defaults for Windows and non-Windows.
* The config path can be provided as an environemnt variable. If not provided,
* we choose sane defaults for Windows and non-Windows.
*/

@@ -29,2 +28,23 @@ var config_path = process.env.OAUTH_REVERSE_PROXY_CONFIG_PATH;

/**
* The logging directory can be provided as an environment variable. If not provided,
* we choose sane defaults for Windows and non-Windows.
*/
var log_dir = process.env.OAUTH_REVERSE_PROXY_LOG_DIR;
if (!log_dir) {
var os = require('os').type().toLowerCase();
if (os.indexOf('windows') !== -1 || os.indexOf('cygwin') !== -1) {
log_dir = "C:\\ProgramData\\oauth_reverse_proxy\\logs\\";
} else {
log_dir = "/var/log/oauth_reverse_proxy/";
}
}
try {
var logger = require('./lib/logger.js').setLogDir(log_dir);
} catch(e) {
console.err("Failed to initialize logger pointing at %s", log_dir);
process.exit(1);
}
// Create an oauth_reverse_proxy instance at our configured root dir.

@@ -37,5 +57,5 @@ oauth_reverse_proxy.init(config_path, function(err, proxy) {

setTimeout(function() {
process.exit(1);
process.exit(2);
}, 2000);
}
});

@@ -5,7 +5,24 @@ var util = require('util');

var default_config = {
name: 'oauth_reverse_proxy',
streams: [{
level: process.env.OAUTH_REVERSE_PROXY_LOG_LEVEL || "warn",
stream: process.stdout
}]
};
// Create a default logger to use if all else fails.
var default_logger = bunyan.createLogger({name: 'oauth_reverse_proxy'});
var default_logger = bunyan.createLogger(default_config);
// TODO: Wire up file logging
/* istanbul ignore next */
module.exports.setLogDir = function(dir) {
default_config.streams.push({
"level": process.env.OAUTH_REVERSE_PROXY_LOG_LEVEL || "info",
"type": "rotating-file",
"path": dir + "proxy.log"
});
default_logger = bunyan.createLogger(default_config);
};
// Init the logger with a configuration object

@@ -12,0 +29,0 @@ /* istanbul ignore next */

2

package.json
{
"name": "oauth_reverse_proxy",
"description": "An OAuth 1.0a authenticating reverse proxy",
"version": "0.9.10",
"version": "0.9.11",
"contributors": [

@@ -6,0 +6,0 @@ {

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