From 29eaf98f25fab23dbaf4413ee970bbf11528859e Mon Sep 17 00:00:00 2001 From: Lloyd Hilaiel <lloyd@hilaiel.com> Date: Mon, 30 Jan 2012 22:43:06 -0700 Subject: [PATCH] update the in-tree http proxy to use configuration.js --- bin/proxy | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/proxy b/bin/proxy index 9de69ac2e..ad22ac245 100755 --- a/bin/proxy +++ b/bin/proxy @@ -8,10 +8,11 @@ const http = require('http'), -forward = require('../lib/http_forward.js'); +forward = require('../lib/http_forward.js'), +config = require('../lib/configuration.js'); -var port = process.env['PORT'] || 0; -var addy = process.env['IP_ADDRESS'] || '127.0.0.1'; +var port = config.has('bind_to.port') ? config.get('bind_to.port') : 0; +var addy = config.has('bind_to.host') ? config.get('bind_to.host') : "127.0.0.1"; const allowed = /^https:\/\/[a-zA-Z\.\-_]+\/\.well-known\/browserid$/; @@ -22,7 +23,7 @@ var server = http.createServer(function (req, res) { res.end('You can\'t get there from here'); return; } - + forward(url, req, res, function(err) { if (err) { res.writeHead(400); -- GitLab