feat: add website root path settings (#1)

* feat: add website root path settings
* fix: disable cloudflare rocket-loader for iframe-resizer
This commit is contained in:
Axel Cocat 2022-03-16 23:39:45 +01:00 committed by GitHub
parent 1b7e975080
commit b8de1cbc8b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 86 additions and 60 deletions

View file

@ -78,10 +78,19 @@ export class Armory {
this.logger.info("Starting server...");
app.locals.aowow = this.config.aowowUrl;
app.locals.websiteUrl = this.config.websiteUrl;
app.locals.websiteName = this.config.websiteName;
app.locals.iframeMode = this.config.iframeMode;
const locals = {
aowow: this.config.aowowUrl,
websiteUrl: this.config.websiteUrl,
websiteName: this.config.websiteName,
websiteRoot: this.config.websiteRoot,
iframeMode: this.config.iframeMode,
};
for (const key in locals) {
if (locals.hasOwnProperty(key)) {
app.locals[key] = locals[key];
}
}
app.locals.locals = locals;
app.engine(".hbs", handlebarsEngine({
extname: "hbs",

View file

@ -27,6 +27,7 @@ export class Config {
public aowowUrl: string;
public websiteUrl: string;
public websiteName: string;
public websiteRoot: string;
public iframeMode: IIframeModeConfig;
public loadDbcs: boolean;
public hideGameMasters: boolean;