Skip to content

Commit

Permalink
fix(all): Enable https in place.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigorodriguez committed Feb 4, 2022
1 parent 722a950 commit 6b05405
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
11 changes: 5 additions & 6 deletions packages/basic.gblib/services/ScheduleServices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
await CollectionUtil.asyncForEach(schedules, async item => {
this.ScheduleItem(item, min);
});
}
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}.`);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/core.gbapp/services/GBCoreService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6b05405

Please sign in to comment.