Is it possible to set a default max-age or expires header for staticfiles? #1779
-
Hi 👋 I'm currently using CloudFront expects either the If those headers are not set it will default to some configured default value, so I'm not really blocked here. Looking at the code I couldn't find any clear way to add either the Am I missing something? Thanks a lot! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
@abersheeran I have the feeling you can help here. Am I right? 👀 (I'm away from the computer for some days) |
Beta Was this translation helpful? Give feedback.
-
Starlette does not currently support configuring them. But you can use https://baize.aber.sh/asgi#files, as a standard ASGI Application, you can use it directly in starlette project (Just replace |
Beta Was this translation helpful? Give feedback.
-
awesome @Kludex @abersheeran thanks a lot 👍 |
Beta Was this translation helpful? Give feedback.
Starlette does not currently support configuring them. But you can use https://baize.aber.sh/asgi#files, as a standard ASGI Application, you can use it directly in starlette project (Just replace
StaticFiles
).