mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-22 01:47:39 -07:00
[backend] Add Cache-Control to Bull Dashboard
This commit is contained in:
parent
ff660659b8
commit
301c754e95
1 changed files with 4 additions and 0 deletions
|
@ -55,6 +55,10 @@ app.use(async (ctx, next) => {
|
|||
const url = decodeURI(ctx.path);
|
||||
|
||||
if (url === bullBoardPath || url.startsWith(`${bullBoardPath}/`)) {
|
||||
if (!url.startsWith(bullBoardPath + '/static/')) {
|
||||
ctx.set('Cache-Control', 'private, max-age=0, must-revalidate');
|
||||
}
|
||||
|
||||
const token = ctx.cookies.get("token");
|
||||
if (token == null) {
|
||||
ctx.status = 401;
|
||||
|
|
Loading…
Reference in a new issue