docbrown/config/initializers/imgproxy.rb
Mac Siri b5be5990e4
[deploy] Expand Images::Optimizer to support imgproxy (#9909)
* Create _comment.html.erb spec

* Add imgproxy.rb

* Setup imgproxy MVP

* Expand Images::Optimizer to support imgproxy

* Enable imgproxy in dashboards/show WIP

* Create view spec

* Fix typo

* Also check for Imgproxy.config.endpoint

* Use ApplicationConfig instead of ENV

* Update Images::Optimizer#call
2020-08-25 16:00:40 -04:00

20 lines
632 B
Ruby

Imgproxy.configure do |config|
# imgproxy endpoint
#
# Full URL to where your imgproxy lives.
config.endpoint = ApplicationConfig["IMGPROXY_ENDPOINT"]
# Next, you have to provide your signature key and salt.
# If unsure, check out https://github.com/imgproxy/imgproxy/blob/master/docs/configuration.md first.
# Hex-encoded signature key
config.hex_key = ApplicationConfig["IMGPROXY_KEY"]
# Hex-encoded signature salt
config.hex_salt = ApplicationConfig["IMGPROXY_SALT"]
# Base64 encode all URLs
config.base64_encode_urls = true
# Always escape plain URLs
# config.always_escape_plain_urls = true
end