Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

little fixes 2 #322

Merged
merged 4 commits into from

2 participants

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 28, 2012
  1. @yawnt
  2. @yawnt

    "switch to ternary operator"

    yawnt authored
  3. @yawnt

    "add radix to parseInt"

    yawnt authored
  4. @yawnt

    'okay no ternary :<'

    yawnt authored
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 4 deletions.
  1. +3 −3 lib/lib.js
  2. +1 −1  proxy/proxy.js
View
6 lib/lib.js
@@ -88,15 +88,15 @@ var build_proxytable_map = function (cb) {
} else {
resp.forEach(function (row) {
if (row.port && row._id) { // Block null routes
- proxy_map.router[row._id + "." + config.opt.tl_dom] = parseInt(row.port);
+ proxy_map.router[row._id + "." + config.opt.tl_dom] = parseInt(row.port, 10);
}
});
aliasdomains.view('aliasdomains/all', {}, function (err, resp) {
if (resp && resp.length) {
resp.forEach(function (row) {
if (row.port && row._id && row.host) { // Block null routes
- proxy_map.router[row._id] = parseInt(row.port);
- proxy_map.router[row.host] = parseInt(row.port);
+ proxy_map.router[row._id] = parseInt(row.port, 10);
+ proxy_map.router[row.host] = parseInt(row.port, 10);
}
});
}
View
2  proxy/proxy.js
@@ -10,8 +10,8 @@ console.log('Starting proxy initialization');
var proxymap = {};
// Ghetto hack for error page
-var errorPage = '<html><head><title id="title">{title}</title></head><body><br/><br/><br/><br/><br/><center><img src="http://nodester.com/images/rocket-down.png" alt="logo" /><br/><h1 style ="color:#000;font-family:Arial,Helvetica,sans-serif;font-size:38px;font-weight:bold;letter-spacing:-2px;padding:0 0 5px;margin:0;">{code}</h1><h3 style ="color:#000;font-family:Arial,Helvetica,sans-serif;font-size:24px;font-weight:bold;padding:0 0 5px;margin:0;">{error}</h3></center></body></html>';
var getErrorPage = function (title, code, error) {
+ var errorPage = '<html><head><title id="title">{title}</title></head><body><br/><br/><br/><br/><br/><center><img src="http://nodester.com/images/rocket-down.png" alt="logo" /><br/><h1 style ="color:#000;font-family:Arial,Helvetica,sans-serif;font-size:38px;font-weight:bold;letter-spacing:-2px;padding:0 0 5px;margin:0;">{code}</h1><h3 style ="color:#000;font-family:Arial,Helvetica,sans-serif;font-size:24px;font-weight:bold;padding:0 0 5px;margin:0;">{error}</h3></center></body></html>';
return errorPage.replace('{title}', title).replace('{code}', code).replace('{error}', error);
};
Something went wrong with that request. Please try again.