diff options
Diffstat (limited to 'src/internal-server')
-rw-r--r-- | src/internal-server/app/Controllers/Http/ServiceController.js | 10 | ||||
-rw-r--r-- | src/internal-server/config/session.js | 2 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/internal-server/app/Controllers/Http/ServiceController.js b/src/internal-server/app/Controllers/Http/ServiceController.js index c30e9e040..e4a7f0295 100644 --- a/src/internal-server/app/Controllers/Http/ServiceController.js +++ b/src/internal-server/app/Controllers/Http/ServiceController.js | |||
@@ -5,6 +5,10 @@ const Env = use('Env'); | |||
5 | const uuid = require('uuid/v4'); | 5 | const uuid = require('uuid/v4'); |
6 | const path = require('path'); | 6 | const path = require('path'); |
7 | const fs = require('fs-extra'); | 7 | const fs = require('fs-extra'); |
8 | const { LOCAL_HOSTNAME } = require('../../../../config'); | ||
9 | |||
10 | const hostname = LOCAL_HOSTNAME; | ||
11 | const port = Env.get('PORT'); | ||
8 | 12 | ||
9 | class ServiceController { | 13 | class ServiceController { |
10 | // Create a new service for user | 14 | // Create a new service for user |
@@ -84,7 +88,7 @@ class ServiceController { | |||
84 | workspaces: [], | 88 | workspaces: [], |
85 | ...JSON.parse(service.settings), | 89 | ...JSON.parse(service.settings), |
86 | iconUrl: settings.iconId | 90 | iconUrl: settings.iconId |
87 | ? `http://127.0.0.1:${Env.get('PORT')}/v1/icon/${settings.iconId}` | 91 | ? `http://${hostname}:${port}/v1/icon/${settings.iconId}` |
88 | : null, | 92 | : null, |
89 | id: service.serviceId, | 93 | id: service.serviceId, |
90 | name: service.name, | 94 | name: service.name, |
@@ -152,7 +156,7 @@ class ServiceController { | |||
152 | id, | 156 | id, |
153 | name: service.name, | 157 | name: service.name, |
154 | ...newSettings, | 158 | ...newSettings, |
155 | iconUrl: `http://127.0.0.1:${Env.get('PORT')}/v1/icon/${ | 159 | iconUrl: `http://${hostname}:${port}/v1/icon/${ |
156 | newSettings.iconId | 160 | newSettings.iconId |
157 | }`, | 161 | }`, |
158 | userId: 1, | 162 | userId: 1, |
@@ -258,7 +262,7 @@ class ServiceController { | |||
258 | workspaces: [], | 262 | workspaces: [], |
259 | ...JSON.parse(service.settings), | 263 | ...JSON.parse(service.settings), |
260 | iconUrl: settings.iconId | 264 | iconUrl: settings.iconId |
261 | ? `http://127.0.0.1:${Env.get('PORT')}/v1/icon/${settings.iconId}` | 265 | ? `http://${hostname}:${port}/v1/icon/${settings.iconId}` |
262 | : null, | 266 | : null, |
263 | id: service.serviceId, | 267 | id: service.serviceId, |
264 | name: service.name, | 268 | name: service.name, |
diff --git a/src/internal-server/config/session.js b/src/internal-server/config/session.js index 62c4f9cc8..3ce3cc4da 100644 --- a/src/internal-server/config/session.js +++ b/src/internal-server/config/session.js | |||
@@ -88,7 +88,7 @@ module.exports = { | |||
88 | | | 88 | | |
89 | */ | 89 | */ |
90 | redis: { | 90 | redis: { |
91 | host: '127.0.0.1', | 91 | host: 'localhost', |
92 | port: 6379, | 92 | port: 6379, |
93 | password: null, | 93 | password: null, |
94 | db: 0, | 94 | db: 0, |