fix(all): Enable https in place.
This commit is contained in:
parent
722a950033
commit
6b05405705
3 changed files with 7 additions and 8 deletions
|
@ -107,16 +107,15 @@ export class ScheduleServices extends GBService {
|
||||||
* Load all cached schedule from BASIC SET SCHEDULE keyword.
|
* Load all cached schedule from BASIC SET SCHEDULE keyword.
|
||||||
*/
|
*/
|
||||||
public async loadSchedules(min: GBMinInstance) {
|
public async loadSchedules(min: GBMinInstance) {
|
||||||
GBLog.info(`Loading instances from storage...`);
|
|
||||||
let schedules;
|
let schedules;
|
||||||
try {
|
try {
|
||||||
const options = <FindOptions>{ where: { instanceId: min.instance.instanceId } };
|
const options = <FindOptions>{ where: { instanceId: min.instance.instanceId } };
|
||||||
schedules = await GuaribasSchedule.findAll(options);
|
schedules = await GuaribasSchedule.findAll(options);
|
||||||
if (process.env.ENDPOINT_UPDATE === 'true') {
|
GBLog.info(`Loading schedules for ${min.instance.botId}...`);
|
||||||
await CollectionUtil.asyncForEach(schedules, async item => {
|
await CollectionUtil.asyncForEach(schedules, async item => {
|
||||||
this.ScheduleItem(item, min);
|
this.ScheduleItem(item, min);
|
||||||
});
|
});
|
||||||
}
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw new Error(`Cannot schedule: ${error.message}.`);
|
throw new Error(`Cannot schedule: ${error.message}.`);
|
||||||
}
|
}
|
||||||
|
|
|
@ -628,7 +628,7 @@ ENDPOINT_UPDATE=true
|
||||||
value = params ? params[name] : defaultValue;
|
value = params ? params[name] : defaultValue;
|
||||||
}
|
}
|
||||||
if (typeof defaultValue === 'boolean') {
|
if (typeof defaultValue === 'boolean') {
|
||||||
return new Boolean(value ? value.toLowerCase() === 'true' : defaultValue);
|
return new Boolean(value ? value.toString().toLowerCase() === 'true' : defaultValue);
|
||||||
}
|
}
|
||||||
if (typeof defaultValue === 'string') {
|
if (typeof defaultValue === 'string') {
|
||||||
return value ? value : defaultValue;
|
return value ? value : defaultValue;
|
||||||
|
|
|
@ -121,7 +121,7 @@ export class GBServer {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development' && !process.env.BOT_URL) {
|
||||||
const proxy = GBConfigService.get('REVERSE_PROXY');
|
const proxy = GBConfigService.get('REVERSE_PROXY');
|
||||||
if (proxy !== undefined) {
|
if (proxy !== undefined) {
|
||||||
GBServer.globals.publicAddress = proxy;
|
GBServer.globals.publicAddress = proxy;
|
||||||
|
|
Loading…
Add table
Reference in a new issue