Skip to content

Commit

Permalink
Add Cache-Control to Bull Dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
mei23 committed Apr 14, 2024
1 parent e6c9e75 commit 12cf8c6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/backend/src/server/web/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ app.use(async (ctx, next) => {
// %71ueueとかでリクエストされたら困るため
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;
Expand Down

0 comments on commit 12cf8c6

Please sign in to comment.