[Attempt 1] fix slow website
Some checks failed
Queue Release Build / prepare (push) Successful in 25s
Deploy Web Apps / deploy (push) Successful in 17m20s
Queue Release Build / finalize (push) Has been cancelled
Queue Release Build / build-linux (push) Has started running
Queue Release Build / build-windows (push) Has been cancelled
Some checks failed
Queue Release Build / prepare (push) Successful in 25s
Deploy Web Apps / deploy (push) Successful in 17m20s
Queue Release Build / finalize (push) Has been cancelled
Queue Release Build / build-linux (push) Has started running
Queue Release Build / build-windows (push) Has been cancelled
This commit is contained in:
@@ -13,7 +13,16 @@ const serverDistFolder = dirname(fileURLToPath(import.meta.url));
|
||||
const browserDistFolder = resolve(serverDistFolder, '../browser');
|
||||
const indexHtml = join(serverDistFolder, 'index.server.html');
|
||||
const app = express();
|
||||
const commonEngine = new CommonEngine();
|
||||
const commonEngine = new CommonEngine({
|
||||
allowedHosts: [
|
||||
'toju.app',
|
||||
'www.toju.app',
|
||||
'localhost',
|
||||
'127.0.0.1'
|
||||
]
|
||||
});
|
||||
|
||||
app.set('trust proxy', 'loopback');
|
||||
|
||||
/**
|
||||
* Proxy endpoint for Gitea releases API to avoid CORS issues.
|
||||
@@ -51,7 +60,8 @@ app.get(
|
||||
'**',
|
||||
express.static(browserDistFolder, {
|
||||
maxAge: '1y',
|
||||
index: 'index.html'
|
||||
index: 'index.html',
|
||||
redirect: false
|
||||
})
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user