Skip to content

Add custom services#188

Merged
DarthSim merged 6 commits intoimgproxy:masterfrom
mrexox:feature/add-custom-services
Jul 20, 2022
Merged

Add custom services#188
DarthSim merged 6 commits intoimgproxy:masterfrom
mrexox:feature/add-custom-services

Conversation

@mrexox
Copy link
Copy Markdown
Contributor

@mrexox mrexox commented Jul 19, 2022

Add custom service configuration that allows adding new configuration options

Configuration

config/imgproxy.yml

endpoint: https://localhost:3000/
services:
  pro:
    endpoint: https://imgproxy-pro.com/
    key: ...
    salt: ...
    signature_size: 32

With Ruby code

Imgproxy.configure do |config|
  config.endpoint = 'https://localhost:3000/'
  config.service(:pro) do |pro|
    pro.endpoint = 'https://imgproxy-pro.com/'
  end
end

Usage:

Imgproxy.url_for(options, service: :pro) # => Generates url with https://imgproxy-pro.com/ endpoint

mrexox added 2 commits July 19, 2022 19:16
Signed-off-by: Valentin Kiselev <mrexox@evilmartians.com>
Signed-off-by: Valentin Kiselev <mrexox@evilmartians.com>
@mrexox mrexox force-pushed the feature/add-custom-services branch from fe92d8c to be7e4a8 Compare July 20, 2022 12:33
mrexox added 4 commits July 20, 2022 15:41
Signed-off-by: Valentin Kiselev <mrexox@evilmartians.com>
Signed-off-by: Valentin Kiselev <mrexox@evilmartians.com>
Signed-off-by: Valentin Kiselev <mrexox@evilmartians.com>
Signed-off-by: Valentin Kiselev <mrexox@evilmartians.com>
@DarthSim DarthSim merged commit 22c2532 into imgproxy:master Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants