Add a DS_PROXY_URL env variable
This commit is contained in:
parent
bc257911e9
commit
73d4ecf35d
3 changed files with 3 additions and 2 deletions
|
@ -24,6 +24,7 @@ FOG_OPENSTACK_REGION=""
|
||||||
FOG_DIRECTORY=""
|
FOG_DIRECTORY=""
|
||||||
FOG_ENABLED=""
|
FOG_ENABLED=""
|
||||||
CARRIERWAVE_CACHE_DIR="/tmp/tps-local-cache"
|
CARRIERWAVE_CACHE_DIR="/tmp/tps-local-cache"
|
||||||
|
DS_PROXY_URL=""
|
||||||
|
|
||||||
FC_PARTICULIER_ID=""
|
FC_PARTICULIER_ID=""
|
||||||
FC_PARTICULIER_SECRET=""
|
FC_PARTICULIER_SECRET=""
|
||||||
|
|
|
@ -22,7 +22,7 @@ Rails.application.configure do
|
||||||
# Don't care if the mailer can't send.
|
# Don't care if the mailer can't send.
|
||||||
config.action_mailer.raise_delivery_errors = false
|
config.action_mailer.raise_delivery_errors = false
|
||||||
|
|
||||||
config.active_storage.service = :local
|
config.active_storage.service = ENV['FOG_ENABLED'] == 'enabled' ? :openstack : :local
|
||||||
|
|
||||||
# Print deprecation notices to the Rails logger.
|
# Print deprecation notices to the Rails logger.
|
||||||
config.active_support.deprecation = :log
|
config.active_support.deprecation = :log
|
||||||
|
|
|
@ -32,7 +32,7 @@ module Fog::OpenStack::Auth::Catalog
|
||||||
|
|
||||||
def publicize(url)
|
def publicize(url)
|
||||||
search = %r{^https://[^/]+/}
|
search = %r{^https://[^/]+/}
|
||||||
replace = 'https://static.demarches-simplifiees.fr/'
|
replace = "#{ENV['DS_PROXY_URL']}/"
|
||||||
url.gsub(search, replace)
|
url.gsub(search, replace)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue