diff --git a/bin/proxy b/bin/proxy
index 9de69ac2e153a056f207b74f291969e7ce835072..ad22ac2450b0bfebfab666f68a04daa79dc8be77 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);