fix(app): cache logo & subdirectory serving (#13244)

This commit is contained in:
Tony 2023-09-09 21:51:44 +08:00 committed by GitHub
parent fdf2c27c8c
commit 3276104c41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -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);

View File

@ -36,7 +36,7 @@
<body>
<div class="content">
<p>
<img src="/logo.png" alt="RSSHub" width="120">
<img src="./logo.png" alt="RSSHub" width="120">
</p>
<h1>Looks like something went wrong</h1>

View File

@ -79,7 +79,7 @@
<body>
<div class="content">
<p>
<img src="/logo.png" alt="RSSHub" width="100" />
<img src="./logo.png" alt="RSSHub" width="100" />
</p>
<h1>Welcome to