fix (backend): add Cache-Control to Bull Dashboard
This commit is contained in:
parent
2760e7feee
commit
dc02a07774
1 changed files with 4 additions and 0 deletions
|
@ -54,6 +54,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