Commit graph

14 commits

Author SHA1 Message Date
Will Norris
1ceba2538c add -forceCache flag to override no-store and private directives
The httpcache package is intended only to be used in private caches, so
it will cache responses marked `private` like normal.  However,
imageproxy is a shared cache, so these response should not be cached
under normal circumstances.  This change introduces a potentially
breaking change to start respecting the `private` cache directive in
responses.

This also adds a new `-forceCache` flag to ignore the `private` and
`no-store` directives, and cache all responses regardless.
2025-05-01 02:54:36 -07:00
Will Norris
7502adde1c allow overriding cache directives in responses
Add a new `-minCacheDuration` flag to specify a minimum duration to
cache images for.

Updates #28
Updates #144
Fixes #207
Fixes #208
2025-04-30 01:33:37 -07:00
Will Norris
82ce506905 third_party/httpcache: add copy of parts of httpcache 2025-04-30 01:33:37 -07:00
Will Norris
66818a786d
change envy package to avoid replace directive 2021-10-12 20:26:12 -07:00
Will Norris
7eeacfca7a standardize copyright statements (Inc -> LLC) 2019-11-30 10:04:17 -08:00
Will Norris
d8ed21c0f4 fix docker build with new envy package 2019-06-09 21:55:19 +00:00
Will Norris
50e0d1104d allow using environment vars for configuration
fixes #151
2019-06-09 21:11:01 +00:00
Will Norris
576b7c023a return 504 status for timeout errors
modify custom TimeoutHandler to return 504 error and switch imageproxy
to use that func.

Fixes #75
2016-11-29 15:42:08 -08:00
Will Norris
e180185856 add copy of net/http package
this includes an exact copy of the TimeoutHandler func and supporting
types from net/http, modified only to handle minor issues for imported
types.

Ref: #75
2016-11-29 15:42:08 -08:00
Will Norris
dbf505d137 move gifresize into its own repo 2015-05-29 08:02:30 -07:00
Will Norris
5e9ceeaaf6 retain original color palette for resized gifs 2015-05-18 15:37:28 -07:00
Will Norris
66fcba95a0 don't drop error from gif.EncodeAll 2015-05-18 15:15:54 -07:00
Will Norris
58bb2e4ce9 refactor gifresize to be a resuable package
- move out of main package
- export Process func
- Process now accepts an io.Reader and io.Writer as input rather than
  working directly on files
- Process accepts a transform function as input rather than always
  resizing to a fixed size
2015-05-15 15:58:03 -07:00
Will Norris
ef63a74da1 initial import of gifresize package
imported from github.com/dpup/go-scratch/gif-resize under Apache 2.0
license.  License header added to gifresize.go rather than include the
full LICENSE file, since imageproxy is under the Apache 2.0 also and we
already have a copy of the license in the root of this repo.
2015-05-15 15:56:06 -07:00