Skip to content

Commit e8a0c0b

Browse files
committed
[mail] Falling back to env variable hostname
1 parent 1852f27 commit e8a0c0b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

api/parts/mgmt/ip.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ var ip = {},
1616
*/
1717
ip.getHost = function(callback) {
1818
// If host is set in config.js use that, otherwise get the external IP from ifconfig.me
19-
var domain = plugins.getConfig("api").domain;
20-
if (typeof domain !== "undefined" && domain !== "") {
19+
var domain = plugins.getConfig("api").domain || process.env.COUNTLY_CONFIG_HOSTNAME;
20+
if (domain) {
2121
if (domain.indexOf("://") === -1) {
2222
domain = "http://" + domain;
2323
}

0 commit comments

Comments
 (0)