Top 6.1% forks on proxy.golang.org
proxy.golang.org : github.com/ant0ine/go-static-forever
Serve files that never change If you can put a version string (commitish for instance) in the path of your static files, then the content served by the corresponding URLs is guaranteed to never change. A whole set of optimisations become possible. * If the request contains `If-Modified-Since`, return `304` without checking anything * Set the `Expires` to `<forever>` (`<forever>` defaulting to one year) * Set the `Cache-Control` header to `public; max-age=<forever>; s-maxage=<forever>` * Set the `Last-Modified` headers to `<origin>` (`<origin>` being 1970) This handler is implemented as a wrapper around http.FileServer, and when the isDevelopment flag is set, http.FileServer is used directly. Example:
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/ant0ine/go-static-forever
License: MIT
Latest release: over 11 years ago
First release: over 11 years ago
Namespace: github.com/ant0ine
Stars: 19 on GitHub
Forks: 2 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 9 days ago