mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2025-01-22 13:32:53 +09:00
[backend] Add Cache-Control to Bull Dashboard
This commit is contained in:
parent
ff660659b8
commit
301c754e95
@ -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 New Issue
Block a user