only activate hypershield in production (#6541) [deploy]

This commit is contained in:
Molly Struve 2020-03-09 11:31:51 -04:00 committed by GitHub
parent 952930eb07
commit b43df4aff7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 18 deletions

View file

@ -5,6 +5,7 @@ source "https://rubygems.org"
ruby File.read(File.join(File.dirname(__FILE__), ".ruby-version")).strip
group :production do
gem "hypershield", "~> 0.1" # Shields sensitive production data when viewed by admins
gem "nakayoshi_fork", "~> 0.0.4" # solves CoW friendly problem on MRI 2.2 and later
gem "rack-host-redirect", "~> 1.3" # Lean and simple host redirection via Rack middleware
end
@ -54,7 +55,6 @@ gem "honeycomb-beeline", "~> 1.3.0" # Monitoring and Observability gem
gem "html_truncator", "~> 0.4" # Truncate an HTML string properly
gem "htmlentities", "~> 4.3", ">= 4.3.4" # A module for encoding and decoding (X)HTML entities
gem "httparty", "~> 0.18" # Makes http fun! Also, makes consuming restful web services dead easy
gem "hypershield", "~> 0.1" # Shields sensitive production data when viewed by admins
gem "inline_svg", "~> 1.7" # Embed SVG documents in your Rails views and style them with CSS
gem "jbuilder", "~> 2.10" # Create JSON structures via a Builder-style DSL
gem "jquery-rails", "~> 4.3" # A gem to automate using jQuery with Rails

View file

@ -1,18 +1,20 @@
Hypershield.schemas = {
hypershield: {
hide: %w[
auth_data_dump
email
encrypted
encrypted_password
message
message_html
message_markdown
password
previous_refresh_token
refresh_token
secret
token
]
if Rails.env.production?
Hypershield.schemas = {
hypershield: {
hide: %w[
auth_data_dump
email
encrypted
encrypted_password
message
message_html
message_markdown
password
previous_refresh_token
refresh_token
secret
token
]
}
}
}
end