Skip to content

Commit

Permalink
fix(app): cache logo & subdirectory serving (DIYgod#13244)
Browse files Browse the repository at this point in the history
  • Loading branch information
TonyRL authored Sep 9, 2023
1 parent fdf2c27 commit 3276104
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion lib/views/error.art
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion lib/views/welcome.art
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3276104

Please sign in to comment.