diff --git a/lib/config.js b/lib/config.js index f6b17453..0859ee50 100644 --- a/lib/config.js +++ b/lib/config.js @@ -202,7 +202,7 @@ function preprocessConfig(cfg) { var root = cfg.http["root-domain"]; root = root.replace(/^\.*/, ""); cfg.http["root-domain"] = root; - if (root.indexOf(".") !== -1) { + if (root.indexOf(".") !== -1 && !net.isIP(root)) { root = "." + root; } cfg.http["root-domain-dotted"] = root;