1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-06-12 22:27:32 +02:00
Commit Graph

24 Commits

Author SHA1 Message Date
43bd1d73e1 Migrate to golangci-lint v2 2025-03-24 21:01:54 +03:00
528ece8da1 Revised errors for better error reporting 2025-02-17 22:11:40 +03:00
8e5282a415 Fix linter error 2024-12-12 17:59:23 +03:00
d931285ac2 Fix linter warnings 2024-10-02 23:43:24 +03:00
13d311fd1a Reset config at the start of config.Configure() 2024-04-30 17:04:12 +03:00
e31b24931d Update linter and fix linting errors 2024-04-18 21:16:32 +03:00
923b32a1b4 feat: Implement AlwaysRasterizeSvg (#1257)
Implement AlwaysRasterizeSvg
Add sanitize to skip processing
Add tests
Refactoring skipProcessing
2024-03-25 20:53:43 +06:00
04d65a220b Don't set Expires HTTP header 2023-12-04 20:31:05 +03:00
93063787b1 Add svg package tests 2023-07-04 18:34:18 +03:00
4de9b83899 fix(svg/sanitize): preserve headers from origin data 2023-07-04 18:34:18 +03:00
4944dfab30 Support Last-Modified response header and support If-Modified-Since request header. (#1147)
* Always return Last-Modified and support If-Modified-Since.

* IMGPROXY_USE_LAST_MODIFIED config setting.

IMGPROXY_USE_LAST_MODIFIED  (default false) when enabled will return the
Last-Modified time of the upstream image and also allow the support of
the If-Modified-Since request header (returning a 304 if the image
hasn't been modified).

If-Modified-Since allows If-None-Match to take precedence.

* Fixes based on DarthSim's feedback.

1. Don't worry about nil maps.
2. Fix a test now that we use the config.LastModifiedEnabled (and move
   it's location it he test file to a more sane place).
3. Update GCS transport code based on the refactoring of DarthSim.

In this iteration, we pull the Updated time from the GCS object attributes
and format them as a string. We then parse it in the notmodified module.
Seems a bit silly to do it this way. If we agree on the approach here,
then AWS and Azure can follow.

* Support azure, fs, s3, and swift.

* Grab the headers for If-Modified-Since and Last-Modified before parsing them.

* Add tests for last-modified for fs.

* Support Last-Modified being passed when streaming an upstream file.

* Tests for Last-Modified for GCS and Azure

* Support s3 and swift tests. Sadly fakes3 doesn't support Last-Modified

* Test against forked gofakes3
2023-05-03 21:21:46 +06:00
1a9768a2c6 Prohibit connecting to loopback, link-local multicast, and link-local unicast IP addresses by default 2023-03-22 20:25:51 +03:00
e719c9d39b Get rid of io/ioutil usage 2022-10-28 21:15:13 +06:00
f5f4fb6487 Borrow buffer from imagedata pool when sanitizing SVG 2022-10-15 19:31:04 +06:00
d610afb48b Use require instead of assert in tests 2022-07-18 19:48:50 +06:00
e1e2277a32 Sanitize SVG 2022-06-10 18:23:55 +06:00
9b5001c219 Disable logs in processhing_handler_test 2022-04-07 14:14:44 +06:00
749d29bf44 Stabilize etag tests 2021-09-30 22:00:28 +06:00
7709b74a5e Bump version 2021-09-30 20:23:30 +06:00
57c314b1f5 Etag passthough 2021-09-29 16:23:54 +06:00
d016e26e2e Merge branch 'master' into version/3 2021-09-07 19:04:33 +06:00
b8ae4640e8 Fix tests compatibility with go < 1.16 2021-05-18 16:06:52 +06:00
0af4720cfa Use imagetype and config in imagemeta 2021-05-13 20:39:13 +06:00
2ea1466d96 Global refactoring 2021-05-07 17:10:21 +06:00