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.
I'm honestly not sure which formatter this is using. Probably something
from the markdown LSP server I'm using. Maybe something built in to
neovim or that ships with LazyVim?
- switch to "project authors" style copyright. Instead of an AUTHORS
file (https://opensource.google/docs/releasing/authors/), I just list
Google as a major copyright holder in the README.
- use SPDX style license headers in source files
- remove CLA requirement from contributing docs
This is mostly an experiment, but I think it will work well. GitHub
Actions provides MacOS and Windows builds (though I'm only adding in
Windows at the moment), and cleaner integration. Builds also seem to be
completing faster than Travis.
when we changed the container to run as a non-root user, it broke some
imageproxy instances that were relying on the default docker user and
file permissions. Users running dockerized imageproxy with a
bind-mounted on-disk cache now need to make sure the user and file
permissions line up.
fixes#198
this is necessary for the new environment variable support for config
values. I don't love that allowHosts is comma separated and cache is
space separated :(
the old nginx config was designed to prevent url canonicalization, which
is no longer a concern, and was causing problems with non-latin
characters.
Fixes#178
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