mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-01-23 11:14:48 +02:00
7a2296aee8
* 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
1.1 KiB
1.1 KiB
Serving files from OpenStack Object Storage ("Swift")
imgproxy can process images from OpenStack Object Storage, also known as Swift. To use this feature, do the following:
-
Set
IMGPROXY_USE_SWIFT
environment variable totrue
-
Configure Swift authentication with the following environment variables
IMGPROXY_SWIFT_USERNAME
: the username for Swift API access. Default: blankIMGPROXY_SWIFT_API_KEY
: the API key for Swift API access. Default: blankIMGPROXY_SWIFT_AUTH_URL
: the Swift Auth URL. Default: blankIMGPROXY_SWIFT_AUTH_VERSION
: the Swift auth version, set to 1, 2 or 3 or leave at 0 for autodetect.IMGPROXY_SWIFT_TENANT
: the tenant name (optional, v2 auth only). Default: blankIMGPROXY_SWIFT_DOMAIN
: the Swift domain name (optional, v3 auth only): Default: blank
-
Use
swift://%{container}/%{object_path}
as the source image URL. e.g. an original object storage URL in the format of/v1/{account}/{container}/{object_path}
such ashttp://127.0.0.1:8080/v1/AUTH_test/images/flowers/rose.jpg
should be converted toswift://images/flowers/rose.jpg
.