0
Fork 0
mirror of https://github.com/willnorris/imageproxy.git synced 2024-12-16 21:56:43 -05:00
Commit graph

374 commits

Author SHA1 Message Date
Will Norris
3f8364feac vendor: remove unused dep github.com/satori/uuid 2018-09-15 06:46:55 +00:00
Will Norris
70276f36bc rename 'Whitelist' to 'RemoteHosts"
This better describes what exactly is being allowed.
2018-09-15 05:55:02 +00:00
Will Norris
0370572130 change how content-type enforcement is handled
If no content types are specified, then accept all responses, regardless
of content type (this is the behavior imageproxy has historically had).
Change default value for the contentTypes flag to be "image/*", so that
the new default when running cmd/imageproxy is that only images will be
proxied.  The old default behavior can be achieved by passing an empty
string for the contentTypes flag:

    imageproxy -contentTypes ""

Do not send the "XCTO: nosniff" header, since all documentation that I
can find still says that it can cause problems when served with images.
If it's effectively a noop when an explicit content-type is specified in
the response, then this shouldn't actually matter for us either way.
But in the absence of certainty, I'd rather err on the side of following
the spec.

Also add documentation for the new functionality.

Fixes #141
2018-09-15 05:36:25 +00:00
Christopher Brown
39a4e1813d content-type checking 2018-09-15 04:00:34 +00:00
Wilrik
74c16f575e fixed tcp_mem resource leak when sending 304 2018-07-06 08:14:09 -07:00
Will Norris
2ad861f4b0 gcscache: fix typo in package godoc 2018-06-02 16:44:20 +00:00
Dao Hoang Son
8fc9d8876c Include image URL in transform error log message 2018-05-20 08:32:16 -07:00
Will Norris
82ba3b6445 readme: move badges below title 2018-02-06 16:09:10 +00:00
Will Norris
1933f5bf1c update all vendored dependencies 2018-02-02 10:23:34 +00:00
Will Norris
0c20cbe5b5 switch to use internal gcscache 2018-02-02 10:05:56 +00:00
Will Norris
7bf3645c10 add custom cache for google cloud storage
This is a bit cleaner than the gcs cache that was vendored in, is
properly licensed, and uses Google's application default credentials,
which just magically works when run from AppEngine and GCE.
2018-02-02 09:56:25 +00:00
Will Norris
e7f9017674 dockerfile: use go 1.9
- setting myself as maintainer.  I've played with docker enough at this
point that I feel a bit more comfortable maintaining this
- name the build image
2017-10-07 03:10:11 +00:00
matematik7
837e72352f dockerfile: use scratch image to reduce size
Fixes #113
2017-10-07 03:09:33 +00:00
Will Norris
37c9f4d6ab preserve original URL encoding
fixes #115
2017-10-05 17:57:41 +00:00
Will Norris
7dbadc01d4 list image with smart crop first to match text 2017-09-27 03:47:08 +00:00
Will Norris
afbd254cdc add smartcrop feature
fixes #55
2017-09-27 00:54:15 +00:00
Will Norris
20c0a50a31 vendor: add github.com/muesli/smartcrop and deps 2017-09-27 00:35:00 +00:00
Will Norris
ba2da75102 parse crop and resize params before transforms 2017-09-27 00:04:04 +00:00
Will Norris
8eee5513ab refactor cropParams to return image.Rectangle 2017-09-26 20:55:03 +00:00
Will Norris
9fcdcadfa4 update README
- mention caching options in feature overview
- remove not about fetching with go1.2
2017-09-26 15:49:08 +00:00
James Reggio
ebcfb52f3a Fix interpretation of Last-Modified and If-Modified-Since headers
If the dates in `Last-Modified` and `If-Modified-Since` are an exact
match, the server should 304.
2017-09-23 17:01:24 -07:00
Will Norris
50c30f1f85 update/simplify travis config 2017-09-23 20:46:44 +00:00
Will Norris
91a4a63740 vendor: add github.com/die-net/lrucache 2017-09-17 11:20:04 +00:00
Will Norris
13409fd7c6 add support for tiered caches
The -cache flag can be specified multiple times to create a tier of
caches.  Typically this would be used to be put a small in-memory cache
in front of a slower on-disk cache.

Fixes #111
2017-09-17 11:20:04 +00:00
Will Norris
a57047ff22 replace in-memory cache with size-limited lrucache
Fixes #4
2017-09-17 11:13:22 +00:00
Will Norris
db55cb60f8 sort cache select cases 2017-09-17 11:12:11 +00:00
Will Norris
a4304294da vendor: remove unused packages 2017-09-12 05:16:22 +00:00
Will Norris
7338ef68ef switch from glog to standard log library
add "-verbose" flag for more logging.

fixes #105
2017-09-12 05:14:46 +00:00
Will Norris
9654679655 vendor: remove unused packages 2017-09-12 04:47:38 +00:00
Will Norris
c751f5b2c9 vendor: add aws-sdk-go and dependencies 2017-09-12 04:47:38 +00:00
Will Norris
0ee5167444 switch to official AWS Go SDK
This uses the official Go SDK from Amazon, which supports the newer v4
authentication method.  Fixes #74.  Doing so also required adding a new
s3cache package which uses the official SDK.

THIS IS A BREAKING CHANGE for anyone that uses s3, since the syntax of
the command line flag is now different.  This is unfortunately necessary
because aws-sdk-go always requires the region to be explicitly declared,
which wasn't always the case with the previous format.  This breaking
change is unfortunate, but given that the other s3 package hasn't seen
updates in years, and so many new S3 regions only support the newer v4
authentication method, it's necessary.
2017-09-12 04:44:43 +00:00
Will Norris
5264eb6db0 remove long-deprecated cacheDir and cacheSize flags 2017-09-09 08:33:06 +00:00
Will Norris
5ee7e282cf return a 200 OK for requests to root /
This has come up a couple of times, such as in #95.  As discussed there,
I'm not completely sure this is actually necessary in many cases, but
it's certainly not harmful and if it makes health checks easier to setup
than why not?
2017-09-09 08:31:22 +00:00
Will Norris
955ea12402 remove goxc stuff and update deploy docs
I don't use goxc anymore, and it hasn't been an active project in a
really long time, so there's no need in referencing it.
2017-09-09 08:14:25 +00:00
Will Norris
4aa8e01f60 add my personal systemd config 2017-09-09 08:11:47 +00:00
Will Norris
6b1cc060a0 vendor: add github.com/gregjones/httpcache/redis 2017-09-09 07:16:02 +00:00
Will Norris
dbfc693aea add support for redis cache backend
fixes #49
2017-09-09 07:14:44 +00:00
Will Norris
2d4bf70da0 vendor: add github.com/rwcarlsen/goexif 2017-09-09 06:13:33 +00:00
Will Norris
67619a67ae add support for exif orientation tag
if any transformation is requested, first apply any additional
transformation necessary to correct for the EXIF orientation tag, since
it is stripped from the resulting image.

Fixes #63
2017-09-09 06:13:33 +00:00
Will Norris
07c54b46e3 normalize rotate values
A -90 or 630 degree rotation is the same as 270.
2017-09-09 06:12:19 +00:00
Will Norris
76c8498abe vendor: add packages needed for azure support 2017-09-09 06:12:15 +00:00
Paul Roy
f1ef8af9ec adding azure support 2017-09-08 15:47:35 +00:00
Will Norris
03d75816a0 fix ordering of flip and rotation transformations
Fixes #112
2017-09-06 22:01:13 +00:00
Diego Marangoni
4b637567e3 add GCS cache 2017-09-01 20:46:05 +00:00
Will Norris
0fe3656939 vendor: add github.com/diegomarangoni/gcscache
also include all transitive dependencies of gcscache, which seems to
bring in the entire world of Google Cloud Platform.
2017-09-01 20:46:05 +00:00
Diego Marangoni
fcb6465a29 uprade to Go version 1.8
This is needed for upcoming dependencies for Google Cloud Storage
support.
2017-09-01 20:24:40 +00:00
Will Norris
817908938e allow forcing encoding as tiff 2017-08-31 17:06:22 -07:00
Michael Carey
c1a9dab401 Support TIFF images. 2017-08-31 13:04:10 -07:00
Will Norris
4533f0c68a allow crop options to be floats and negative
values between 0 and 1 have the same behavior as the size option - it is
treated as a percentage of the original image size.  Negative values for
cx and cy are calculated from the bottom and right edges of the image.
2017-08-31 07:27:35 +00:00
Will Norris
430baac0b0 minor cleanup to README and options docs
- remove unnecessary option example
- add option example for format changes
- move `-help` text to bottom of section
2017-08-31 07:25:02 +00:00