Replies: 3 comments 3 replies
-
What about write the following? app.get('*', cache({ cacheName: 'foo' }), serveStatic()) |
Beta Was this translation helpful? Give feedback.
-
I tried the following: app.get("*", cache({...}), serveStatic({...}));
app.get("*", async () => new Response("Hello")); But the cache headers are being set to both middleware and handler. |
Beta Was this translation helpful? Give feedback.
-
Hi @fineshop I've thought this issue but, it's seems to be impossible. The handlers and middleware are applied for the path such as app.get('/static/*', cache(), serveStatic()) Or app.get('/:filename{.+\\.txt$}', cache(), serveStatic()) |
Beta Was this translation helpful? Give feedback.
-
How can i use the
cache({...})
only forserveStatic({...})
and not for other handlers?Beta Was this translation helpful? Give feedback.
All reactions