Skip to content

Commit

Permalink
Production environment needs to use proxy for rollbar, add configurat…
Browse files Browse the repository at this point in the history
…ion for this
  • Loading branch information
murny committed Dec 6, 2023
1 parent 56175df commit 0f195d2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
12 changes: 6 additions & 6 deletions config/initializers/rollbar.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@
# The :host key is mandatory and must include the URL scheme (e.g. 'http://'), all other fields
# are optional.
#
# config.proxy = {
# host: 'http://some.proxy.server',
# port: 80,
# user: 'username_if_auth_required',
# password: 'password_if_auth_required'
# }
config.proxy = {
host: Rails.application.secrets.rollbar_proxy_host,
port: Rails.application.secrets.rollbar_proxy_port,
user: Rails.application.secrets.rollbar_proxy_user,
password: Rails.application.secrets.rollbar_proxy_password
}

# If you run your staging application instance in production environment then
# you'll want to override the environment reported by `Rails.env` with an
Expand Down
9 changes: 9 additions & 0 deletions config/secrets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,13 @@
shared:
cms_user: 'admin'
cms_password: 'mysecretpassword'

staging:
rollbar_access_token: <%= ENV['ROLLBAR_ACCESS_TOKEN'] %>

production:
rollbar_access_token: <%= ENV['ROLLBAR_ACCESS_TOKEN'] %>
rollbar_proxy_host: <%= ENV['ROLLBAR_PROXY_HOST'] %>
rollbar_proxy_port: <%= ENV['ROLLBAR_PROXY_PORT'] %>
rollbar_proxy_user: <%= ENV['ROLLBAR_PROXY_USER'] %>
rollbar_proxy_password: <%= ENV['ROLLBAR_PROXY_PASSWORD'] %>

0 comments on commit 0f195d2

Please sign in to comment.