docbrown/config/initializers/1_imgproxy.rb
Michael Kohl 6dfabd578f
Rename SiteConfig to Settings::General (#13573)
* Rename SiteConfig

* More renaming

* Update spec

* Update mandatory settings mapping

* More renaming

* e2e test fixes

* You have a rename, and you have a rename

* Spec fix

* More changes

* Temporarily disable specs

* After-merge update

* Undo rename for migration

* undo rename of DUS

* Fix DUS

* Fix merge problem

* Remove redundant DUS

* Fix specs

* Remove unused code

* Change wrong class name

* More cleanup

* Re-add missing values to constant

* Fix constant

* Fix spec

* Remove obsolete fields

* Add accidentally removed field

* Update spec

* Move methods from Settings::General to ForemInstance

* Remove unneeded model

* Change mentions of 'site config'
2021-05-21 14:45:37 +02:00

23 lines
729 B
Ruby

# This file has to run before Carrierwave
Imgproxy.configure do |config|
# imgproxy endpoint
#
# Full URL to where your imgproxy lives.
#
config.endpoint = nil # Images::Optimizer will set the endpoint because Settings::General is not ready during boot
# 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.key = ApplicationConfig["IMGPROXY_KEY"]
# Hex-encoded signature salt
config.salt = ApplicationConfig["IMGPROXY_SALT"]
# Base64 encode all URLs
config.base64_encode_urls = true
# Always escape plain URLs
# config.always_escape_plain_urls = true
end