1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2024-11-24 08:12:38 +02:00
Commit Graph

61 Commits

Author SHA1 Message Date
DarthSim
c56e9e64b9 Add IMGPROXY_PNG_UNLIMITED and IMGPROXY_SVG_UNLIMITED configs 2024-04-15 20:28:05 +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
aa1b7b6973 Migrate from aws-sdk-go to aws-sdk-go-v2 2024-03-07 22:25:18 +03:00
DarthSim
8f95063e16 Increase IMGPROXY_MAX_SRC_RESOLUTION default value to 50 2024-03-07 17:43:04 +03:00
DarthSim
7d2b61e63b Fix loading environment variables from the AWS System Manager Parameter Store when there are more than 10 parameters 2024-03-05 20:27:18 +03:00
DarthSim
5d7fe36a67 Revise OpenTelemetry configuration: use standard OTel env vars when possible 2024-02-25 00:40:52 +03:00
DarthSim
73c54abd4e Add IMGPROXY_TRUSTED_SIGNATURES config 2024-02-22 17:33:52 +03:00
DarthSim
54313eb207 Add AWS Lambda adapter to the Docker image; Set workers and vips concurrency when running in AWS Lambda 2024-01-22 18:47:48 +03:00
Marc Köhlbrugge
a2fd4bc063 Fix typo (loacal -> local) 2023-12-23 02:25:32 +06:00
DarthSim
79e6b32c9c Allow IMGPROXY_TTL to be zero 2023-12-04 19:42:07 +03:00
Garen J. Torikian
b384e2bb7f Add client-side decryption support to S3 2023-11-05 23:10:51 +03:00
DarthSim
93b1dc5757 Load env variables from env files or secrets 2023-08-16 00:18:07 +06:00
DarthSim
07e34a45f2 Rename concurrency to workers 2023-08-15 21:05:55 +03:00
DarthSim
3557fa2c4e Add S3 multi-region mode 2023-08-02 21:32:51 +03:00
DarthSim
9175c66fee Update maximum and default AVIF speed 2023-06-29 20:05:24 +03:00
DarthSim
a246eda065 Ensure URL replacements are executed in the specified order 2023-05-28 19:59:51 +03:00
DarthSim
aaaf1c706d Normalize IMGPROXY_PATH_PREFIX and IMGPROXY_HEALTH_CHECK_PATH 2023-05-17 17:55:12 +03:00
DarthSim
bc5ca9a344 Add URL replacements 2023-05-15 20:15:12 +03:00
Adomas Kizogian
e8952edbf7
allow acquiring s3 access credentials through role assumption (#1152)
* allow acquiring s3 access credentials through role assumption

* improve cross-account access docs

* Update docs/serving_files_from_s3.md

Co-authored-by: Sergey Alexandrovich <DarthSim@users.noreply.github.com>

---------

Co-authored-by: Sergey Alexandrovich <DarthSim@users.noreply.github.com>
2023-05-09 20:50:02 +06: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
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
9416168575 Security processing options 2023-02-23 21:11:44 +03:00
Sasha Melentyev
4685e4e222
chore: Changing fmt.Errorf to errors.New when there is no formatting required (#1044)
Co-authored-by: Sergey Alexandrovich <DarthSim@users.noreply.github.com>
2022-12-15 21:03:08 +06:00
DarthSim
79e473798d Add CloudWatch metrics 2022-12-04 21:01:37 +06:00
DarthSim
bf472d3df9 Use runtime.GOMAXPROCS to calc default concurrency 2022-12-01 01:42:47 +06:00
DarthSim
1ededbb11f Add IMGPROXY_MAX_ANIMATION_FRAME_RESOLUTION config 2022-11-29 18:25:38 +06:00
DarthSim
3f9a0641f1 Remove WebP, AVIF, and ICO from preferred formats 2022-11-27 20:01:07 +06:00
DarthSim
27bf8505e1 Change the default AVIF quality and speed 2022-11-27 20:01:01 +06:00
DarthSim
f08cc76806 Fixed TraceIdRatioBased sampler; IMGPROXY_OPEN_TELEMETRY_TRACE_ID_GENERATOR config 2022-11-15 21:37:55 +06:00
DarthSim
caef5eeff1 Add IMGPROXY_OPEN_TELEMETRY_GRPC_INSECURE config 2022-11-07 21:08:01 +06:00
DarthSim
4e669c8717 Add IMGPROXY_CLIENT_KEEP_ALIVE_TIMEOUT config 2022-10-21 16:40:24 +06:00
DarthSim
4ab415fd9b Fix feDropShadow SVG filter when IMGPROXY_SVG_FIX_UNSUPPORTED is true 2022-10-15 20:22:54 +06:00
Sergey Alexandrovich
36f67a6f96
OpenTelemetry support (#995) 2022-10-06 15:08:23 +06:00
DarthSim
ff3d3cedc4 Rename configurators.Hex to configurators.HexSlice and configurators.HexFile to configurators.HexSliceFile 2022-08-26 17:21:37 +03:00
DarthSim
c4801761db Additional metrics for Datadog 2022-07-26 14:22:17 +06:00
DarthSim
9081fd5766 IMGPROXY_REQUESTS_QUEUE_SIZE config 2022-07-20 19:46:21 +06:00
DarthSim
1524a0e973 Increase IMGPROXY_TTL to 1 year 2022-07-19 18:14:10 +06:00
DarthSim
bb3a9c77f7 Set default IMGPROXY_MAX_CLIENTS value to 2048; Allow unlimited connections 2022-07-19 18:04:22 +06:00
DarthSim
f368ed13e9 IMGPROXY_PREFERRED_FORMATS config 2022-07-18 17:58:59 +06:00
DarthSim
84dc50f2af Add New relic labels supoprt 2022-06-24 17:03:13 +06:00
DarthSim
e1e2277a32 Sanitize SVG 2022-06-10 18:23:55 +06:00
Valentine Kiselev
23d0807e46
Add attachment option for Content-Disposition header (#887)
* Add attachment option for Content-Disposition header

Signed-off-by: Valentin Kiselev <mrexox@evilmartians.com>

* Add documentation to attachment option

Signed-off-by: Valentin Kiselev <mrexox@evilmartians.com>

* Add default attachment option value

Signed-off-by: Valentin Kiselev <mrexox@evilmartians.com>

* fix: Add default value to docs

Signed-off-by: Valentin Kiselev <mrexox@evilmartians.com>

* fix: Rename option attachment to return_attachment, add ENV-configuration

Signed-off-by: Valentin Kiselev <mrexox@evilmartians.com>
2022-06-06 14:53:09 +06:00
DarthSim
4d4a1d724f IMGPROXY_KEEP_COPYRIGHT config & keep_copyright option 2022-04-25 16:53:08 +06:00
DarthSim
e1a69c5d95 IMGPROXY_ENFORCE_THUMBNAIL config & enforce_thumbnail option 2022-04-14 22:33:09 +06:00
DarthSim
3d93bc6836 Add IMGPROXY_GCS_ENDPOINT config 2022-04-07 23:31:50 +06:00
DarthSim
afe283790f Polish swift:// support 2022-04-06 17:35:51 +06:00
Joe Cai
7a2296aee8
Support OpenStack Swift Object Storage (#837)
* Add OpenStack Swift support

* Fix linting errors

* Update CHANGELOG

* Update swift documentation

* Fix linting error

* Swift transport: pass req.Context down, fix parseObjectURL() implementation

* Make swift transport test a test suite

* Use swift://{container}/{object_path} as the source image URL format

* Cleanup

* Swift transport: only close object when returning 304
2022-04-06 17:00:19 +06:00
dcanob
f37d027f4f
add config fallback ttl to avoid default ttl when fallback response (#818)
* add config fallback ttl to avoid default ttl when fallback response

* Update docs/configuration.md

Co-authored-by: Sergey Alexandrovich <DarthSim@users.noreply.github.com>

* move FallbackTTL to loadFallbackImage

* rewrite ifelse

* Update imagedata/image_data.go

don't use config.FallbackTTL on header to get TTL on the response

Co-authored-by: Sergey Alexandrovich <DarthSim@users.noreply.github.com>

* Update processing_handler.go

don't use config.FallbackTTL on header to get TTL on the response

Co-authored-by: Sergey Alexandrovich <DarthSim@users.noreply.github.com>

* rename FallbackTTL to FallbackImageTTL

* Update processing_handler.go

* Fix linter errors

Co-authored-by: Sergey Alexandrovich <DarthSim@users.noreply.github.com>
2022-03-31 13:36:13 +06:00
DarthSim
df818706c2 IMGPROXY_HEALTH_CHECK_PATH config 2022-02-21 18:06:20 +06:00
Sergey Alexandrovich
ec02fc53a5
IMGPROXY_MAX_REDIRECTS config (#797)
* IMGPROXY_MAX_REDIRECTS config

* Apply suggestions from code review

Co-authored-by: Travis-Turner <32389151+Travis-Turner@users.noreply.github.com>

Co-authored-by: Travis-Turner <32389151+Travis-Turner@users.noreply.github.com>
2022-02-16 15:42:09 +06:00