Rename config FS_IP to FS_HOSTNAME

This commit is contained in:
Zaid Abdulla committed 2017-03-09 20:50:39 -08:00
1 parent 0014af5bd0
commit 7cfafdcd74
2 files changed
+6 -3

No files matched your search

+4 -1
View File
@@ -43,7 +43,7 @@ options = {
FS_PORT : {type : 'int', default : 7567}, FS_PORT : {type : 'int', default : 7567},
FS_INTERFACE : {type : 'string', default : '0.0.0.0'}, FS_INTERFACE : {type : 'string', default : '0.0.0.0'},
FS_SSL : {type : 'bool', default : false}, FS_SSL : {type : 'bool', default : false},
FS_IP : {type : 'string', default : '192.168.0.1'}, FS_HOSTNAME : {type : 'string', default : 'acs.example.com'},
FS_LOG_FILE : {type: 'path', default : ''}, FS_LOG_FILE : {type: 'path', default : ''},
FS_ACCESS_LOG_FILE : {type : 'path', default : ''}, FS_ACCESS_LOG_FILE : {type : 'path', default : ''},
@@ -98,6 +98,9 @@ setConfig = (name, value, commandLineArgument) ->
if name in ['XML_PARSE_RECOVER', 'xml-parse-recover'] if name in ['XML_PARSE_RECOVER', 'xml-parse-recover']
setConfig('XML_RECOVER', value) setConfig('XML_RECOVER', value)
if name in ['FS_IP', 'fs-ip']
setConfig('FS_HOSTNAME', value)
cast = (val, type) -> cast = (val, type) ->
switch type switch type
when 'int' when 'int'
+2 -2
View File
@@ -503,10 +503,10 @@ sendAcsRequest = (sessionContext, id, acsRequest) ->
if acsRequest.name is 'Download' if acsRequest.name is 'Download'
if not acsRequest.url? if not acsRequest.url?
FS_PORT = config.get('FS_PORT') FS_PORT = config.get('FS_PORT')
FS_IP = config.get('FS_IP') FS_HOSTNAME = config.get('FS_HOSTNAME')
FS_SSL = config.get('FS_SSL') FS_SSL = config.get('FS_SSL')
acsRequest.url = if FS_SSL then 'https://' else 'http://' acsRequest.url = if FS_SSL then 'https://' else 'http://'
acsRequest.url += FS_IP acsRequest.url += FS_HOSTNAME
acsRequest.url += ":#{FS_PORT}" if FS_PORT != 80 acsRequest.url += ":#{FS_PORT}" if FS_PORT != 80
acsRequest.url += "/#{encodeURIComponent(acsRequest.fileName)}" acsRequest.url += "/#{encodeURIComponent(acsRequest.fileName)}"