-
-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to configure headers for assets to allow caching. #137
Comments
For now there isn't anything like that for static files. However you can do something like this
P.S: This will add cache for all. |
Thanks. Would there be a way to do something like |
@sdogruyol @isaacsloan if you have access to the env in the |
@ukd1 @isaacsloan currently |
Related issue crystal-lang/crystal#2470 |
Only slightly related to this issue, but: Is there a way to set custom headers per route? |
@gottlike sure something like this is possible. get "/route1" do |env|
env.response.headers.add "Some Header", "Some Value",
"Response from 1"
end
get "/route2" do |env|
env.response.headers.add "Another Header", "Another Value",
"Response from 2"
end |
Cool, thanks for the quick reply! |
No description provided.
The text was updated successfully, but these errors were encountered: