diff options
| author | MeiMei <30769358+mei23@users.noreply.github.com> | 2024-04-27 12:57:00 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-27 12:57:00 +0900 |
| commit | 6abb8c49943a0d9002118fb3b50e20940aa1e3ba (patch) | |
| tree | 6bf8e0038424dc694c3ddebc5c7f7d291c804cee /packages/backend/src/server/web/ClientServerService.ts | |
| parent | feat: improve emoji endpoint (#13742) (diff) | |
| download | sharkey-6abb8c49943a0d9002118fb3b50e20940aa1e3ba.tar.gz sharkey-6abb8c49943a0d9002118fb3b50e20940aa1e3ba.tar.bz2 sharkey-6abb8c49943a0d9002118fb3b50e20940aa1e3ba.zip | |
Merge pull request from GHSA-m9qf-3pfj-2r86
* Add Cache-Control to Bull Board
* CHANGELOG
---------
Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
Diffstat (limited to 'packages/backend/src/server/web/ClientServerService.ts')
| -rw-r--r-- | packages/backend/src/server/web/ClientServerService.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/backend/src/server/web/ClientServerService.ts b/packages/backend/src/server/web/ClientServerService.ts index b1af0c3df6..ba2f8b4324 100644 --- a/packages/backend/src/server/web/ClientServerService.ts +++ b/packages/backend/src/server/web/ClientServerService.ts @@ -202,6 +202,10 @@ export class ClientServerService { // %71ueueとかでリクエストされたら困るため const url = decodeURI(request.routeOptions.url); if (url === bullBoardPath || url.startsWith(bullBoardPath + '/')) { + if (!url.startsWith(bullBoardPath + '/static/')) { + reply.header('Cache-Control', 'private, max-age=0, must-revalidate'); + } + const token = request.cookies.token; if (token == null) { reply.code(401).send('Login required'); |