From 3276104c418126df77a5fdf2f267057f4a3f7558 Mon Sep 17 00:00:00 2001 From: Tony Date: Sat, 9 Sep 2023 21:51:44 +0800 Subject: [PATCH] fix(app): cache logo & subdirectory serving (#13244) --- lib/app.js | 4 ++-- lib/views/error.art | 2 +- lib/views/welcome.art | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/app.js b/lib/app.js index c958f0f6f..39b91f574 100644 --- a/lib/app.js +++ b/lib/app.js @@ -37,8 +37,8 @@ const app = new Koa(); app.proxy = true; // favicon -app.use(favicon(__dirname + '/favicon.png')); -app.use(serve(__dirname + '/static')); +app.use(favicon(__dirname + '/favicon.png', { maxAge: 31536000000 })); +app.use(serve(__dirname + '/static', { maxage: 31536000000 })); // global error handing app.use(onerror); diff --git a/lib/views/error.art b/lib/views/error.art index 8579fc0e6..cbd40ed9d 100644 --- a/lib/views/error.art +++ b/lib/views/error.art @@ -36,7 +36,7 @@

- RSSHub + RSSHub

Looks like something went wrong

diff --git a/lib/views/welcome.art b/lib/views/welcome.art index f97703118..0ff6ba639 100644 --- a/lib/views/welcome.art +++ b/lib/views/welcome.art @@ -79,7 +79,7 @@

- RSSHub + RSSHub

Welcome to