Skip to content

Commit

Permalink
etag cache
Browse files Browse the repository at this point in the history
  • Loading branch information
robertotcestari committed Aug 8, 2024
1 parent 56eee2c commit 092a2aa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import vimeoVideo from './routes/vimeo-video';
import uploadImage from './routes/upload-image';
import uploadAvatarImage from './routes/upload-avatar-image';
import avatarPlaceholder from './routes/avatars/avatar-placeholder';
import { etag } from 'hono/etag';

const app = new Hono();

Expand All @@ -18,6 +19,7 @@ app.route('/upload-image', uploadImage);
app.route('/upload-avatar-image', uploadAvatarImage);

// Unprotected routes
app.use('/avatars/*', etag());
app.route('/avatars', avatarPlaceholder);

export default {
Expand Down

0 comments on commit 092a2aa

Please sign in to comment.