Victor Sokolov
af890f8b71
IMG-46: Call finishFn on download finished (metrics) ( #1487 )
...
* Skip goes to processing
* Call finishFn on download finished
* defer DownloadFinished in DownloadSync
2025-08-15 12:43:57 +02:00
Victor Sokolov
d47eeee6ad
IMG-44: move skip to processing, remove imath.Min/Max ( #1485 )
...
* Removed imath.Min/Max
* Skip goes to processing
* no svg_processing error category
* should report SVG
2025-08-15 12:38:16 +02:00
Victor Sokolov
09a25f8966
IMG-23: Replace imagemeta with imagedetect ( #1483 )
...
* Replace imagemeta with imagedetect
* Removed imagemeta package
* 1 page in the check
2025-08-13 11:49:48 +02:00
Victor Sokolov
2236bd8170
IMG-23: replace an old imagetype with the new one ( #1482 )
...
* imagetype (new) -> imagetype
* Always fallback in C-D, GetTypeMap -> GetTypeByName
* Do not send origin ContentType
2025-08-13 11:36:25 +02:00
Victor Sokolov
e14e054471
DownloadSync/DownloadAsync ( #1480 )
...
* DownloadSync/DownloadAsync
* No bufpool in svg
* Added ImageData.Error()
* Header ordering in respondWithImage
* Check originData.Error only if processing failed
---------
Co-authored-by: DarthSim <darthsim@gmail.com >
2025-08-11 20:09:54 +06:00
Victor Sokolov
f7a13c99de
IMG-13: separate http.Headers from ImageData ( #1475 )
...
* Separate headers from ImageData
* processing.Result
2025-08-06 16:46:35 +02:00
Victor Sokolov
3d14c85de3
IMG-13: http.Header, *ImageData -> ImageData ( #1473 )
...
* ImageData.Headers()
* *ImageData -> ImageData
* withmatt -> httpheaders of our own
* .Clone() headers, nil
* NewFromBytesWithFormat -> nil
* svg.go -> do not Clone()
2025-08-01 15:44:21 +02:00
DarthSim
e40851e460
Merge branch 'master' into version/4
2025-07-31 23:08:52 +03:00
DarthSim
8967bf7f82
Fix Vary header when JPEG XL supoprt detection is enabled
2025-07-31 23:08:01 +03:00
Victor Sokolov
efbea5fde5
New imagedata interface ( #1471 )
2025-07-31 18:18:13 +02:00
Victor Sokolov
dd3b430f87
transport isolated, imagefetcher introduced ( #1465 )
2025-07-25 12:26:21 +02:00
DarthSim
3c4a75a709
Remove the IMGPROXY_SVG_FIX_UNSUPPORTED
config. The problem it was solving is now fixed in librsvg
2025-06-11 16:45:25 +03:00
DarthSim
15e76a5ce0
Add "Source Image Origin" meta to error reports
2025-05-19 19:22:51 +03:00
DarthSim
8070da962d
Add metadata to nested tracing spans
2025-05-19 19:22:17 +03:00
Tatsuki Sugiura
5426260fa7
Set source image's shema+hostname to imgproxy.source_image_origin of the metric. ( #1432 )
...
* Set target hostname to peer.service of the metric.
* Use URL origin for metric.
* Use short notation.
* Change err variable name to avoid shadowing lint.
2025-05-19 20:53:21 +06:00
DarthSim
2584f689c6
Fix X-Origin-Content-Length
header value when SVG is sanitized or minified
2025-04-29 21:28:50 +03:00
DarthSim
528ece8da1
Revised errors for better error reporting
2025-02-17 22:11:40 +03:00
DarthSim
90e5f19a6e
Rename IMGPROXY_ENABLE_*_DETECTION
configs to IMGPROXY_AUTO_*
2024-12-08 19:26:58 +03:00
DarthSim
ba17ed8f19
Add imgproxy.source_image_url
and imgproxy.processing_options
attributes to New Relic, DataDog, and OpenTelemetry traces
2024-08-23 18:46:46 +03:00
DarthSim
e867d0f10a
Add write response timeout
2024-06-03 20:26:10 +03:00
DarthSim
68d38949d8
Replace semaphore implementation with golang.org/x/sync/semaphore
2024-05-30 18:02:12 +03:00
Frezyy
923b32a1b4
feat: Implement AlwaysRasterizeSvg ( #1257 )
...
Implement AlwaysRasterizeSvg
Add sanitize to skip processing
Add tests
Refactoring skipProcessing
2024-03-25 20:53:43 +06:00
DarthSim
71aea9b507
Add processing options and source image URL to error reports
2024-03-10 20:44:45 +03:00
DarthSim
04d65a220b
Don't set Expires
HTTP header
2023-12-04 20:31:05 +03:00
DarthSim
79e6b32c9c
Allow IMGPROXY_TTL
to be zero
2023-12-04 19:42:07 +03:00
DarthSim
3fe820625d
Revised downloading errors reporting
2023-12-03 21:00:20 +03:00
DarthSim
be31a2e0f6
Fix typo
2023-11-13 20:36:10 +03:00
Phước Trung
16571e1360
fix typo
2023-11-13 23:30:09 +06:00
DarthSim
07e34a45f2
Rename concurrency to workers
2023-08-15 21:05:55 +03:00
DarthSim
fd2566a489
Fix IMGPROXY_CACHE_CONTROL_PASSTHROUGH + IMGPROXY_FALLBACK_IMAGE_TTL behavior
2023-07-25 18:58:05 +03:00
DarthSim
94492e812c
Don't report context cancelled
errors to metrics collectors
2023-07-19 16:43:30 +03:00
Andrei Vydrin
4de9b83899
fix(svg/sanitize): preserve headers from origin data
2023-07-04 18:34:18 +03:00
Ewan Higgs
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
DarthSim
c98752651a
Don't set Content-DPR header
2023-04-18 18:40:23 +03:00
DarthSim
b92de43cf3
Add support for client hints prefixed with Sec-CH-; Remove Viewport-Width header support
2023-04-11 21:08:39 +03:00
DarthSim
1a9768a2c6
Prohibit connecting to loopback, link-local multicast, and link-local unicast IP addresses by default
2023-03-22 20:25:51 +03:00
DarthSim
24f4d43a0f
use "clean" HTTP transport; Use context for downloading timeout control
2023-03-21 20:58:16 +03:00
DarthSim
51aa219315
Add Accept
to the Vary
header if AVIF detection is enabled
2023-03-09 18:08:08 +03:00
DarthSim
50d04d585e
Make the expires
option set Expires and Cache-Control headers
2023-02-24 19:44:03 +03:00
DarthSim
aa80dc022f
Move download options to imagedata.DownloadOptions
2023-02-23 21:39:52 +03:00
DarthSim
9416168575
Security processing options
2023-02-23 21:11:44 +03:00
DarthSim
bbb6a3335d
Remove all known unsafe attrs from SVG during sanitization; Add Content-Security-Policy header to response
2023-01-11 18:32:21 +03:00
DarthSim
4ab415fd9b
Fix feDropShadow SVG filter when IMGPROXY_SVG_FIX_UNSUPPORTED is true
2022-10-15 20:22:54 +06:00
DarthSim
f5f4fb6487
Borrow buffer from imagedata pool when sanitizing SVG
2022-10-15 19:31:04 +06:00
DarthSim
0dc16ba76b
Fix path before signature check
2022-09-15 22:36:47 +06:00
DarthSim
30f744e116
Try to fix path if signature is invalid
2022-09-15 22:12:16 +06:00
DarthSim
0f7281e56e
raw
processing option
2022-09-07 18:03:12 +06:00
DarthSim
cf2b3c5195
requests/images in progress stats and queue time metric
2022-07-26 14:35:49 +06:00
DarthSim
9081fd5766
IMGPROXY_REQUESTS_QUEUE_SIZE config
2022-07-20 19:46:21 +06:00
DarthSim
526724105e
Proper semaphore
2022-07-20 18:06:26 +06:00