mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
Improve image proxy
This commit is contained in:
parent
99dfbdbb47
commit
38941f58cf
2 changed files with 21 additions and 9 deletions
|
@ -46,6 +46,11 @@ func (r *Response) Redirect(path string) {
|
|||
http.Redirect(r.writer, r.request, path, http.StatusFound)
|
||||
}
|
||||
|
||||
// NotModified sends a response with a 304 status code.
|
||||
func (r *Response) NotModified() {
|
||||
r.writer.WriteHeader(http.StatusNotModified)
|
||||
}
|
||||
|
||||
// Cache returns a response with caching headers.
|
||||
func (r *Response) Cache(mimeType, etag string, content []byte, duration time.Duration) {
|
||||
r.writer.Header().Set("Content-Type", mimeType)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue