Skip to content
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

cache-control header #54

Closed
DaleLJefferson opened this issue Nov 24, 2014 · 6 comments
Closed

cache-control header #54

DaleLJefferson opened this issue Nov 24, 2014 · 6 comments
Labels

Comments

@DaleLJefferson
Copy link

How would I set a cache control header for static files in negroni?

@vergilius
Copy link

+1

@esses
Copy link

esses commented May 9, 2015

+1, would be nice to be able to set these in negroni, but not sure if this is outside the realm of negroni being "tiny"

an alternate solution could be implementing your own static file server middleware perhaps with the help of this: https://groups.google.com/forum/#!topic/golang-nuts/n-GjwsDlRco rather than using negroni's out of the box Static() that gets bundled with Classic()

@hexadecy
Copy link

+1
But a simple middleware can do the job just fine. I've started a small package to work around a problem with cache and Internet Explorer.
https://github.com/hexadecy/nocache

@rabeesh
Copy link

rabeesh commented Jul 12, 2015

@esses nocache middleware, with idiomatic approach
https://github.com/rabeesh/negroni-nocache

@meatballhat
Copy link
Member

@dalejefferson are you good with the responses above? 😺

@jszwedko
Copy link
Contributor

jszwedko commented Jun 3, 2016

Gonna close this, but please reopen if you have any additional questions!

@jszwedko jszwedko closed this as completed Jun 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants