fix(all): Enable https in place.

This commit is contained in:
Rodrigo Rodriguez 2022-02-04 18:50:19 -03:00
parent 722a950033
commit 6b05405705
3 changed files with 7 additions and 8 deletions

View file

@ -107,16 +107,15 @@ export class ScheduleServices extends GBService {
* Load all cached schedule from BASIC SET SCHEDULE keyword.
*/
public async loadSchedules(min: GBMinInstance) {
GBLog.info(`Loading instances from storage...`);
let schedules;
try {
const options = <FindOptions>{ where: { instanceId: min.instance.instanceId } };
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 => {
this.ScheduleItem(item, min);
});
}
} catch (error) {
throw new Error(`Cannot schedule: ${error.message}.`);
}

View file

@ -628,7 +628,7 @@ ENDPOINT_UPDATE=true
value = params ? params[name] : defaultValue;
}
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') {
return value ? value : defaultValue;

View file

@ -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');
if (proxy !== undefined) {
GBServer.globals.publicAddress = proxy;