An unofficial, mostly Bitwarden-compatible API server written in Ruby (Sinatra and ActiveRecord)

config.ru: set RACK_ENV to deployment if RUBYWARDEN_ENV is production

If RACK_ENV is not set, which it may not be since RUBYWARDEN_ENV now
has to be used, it will default to development, which will cause
Sinatra to print stack traces and things to the public.

Protect users by setting RACK_ENV to "deployment" when
RUBYWARDEN_ENV is set to "production".

+5
+5
config.ru
··· 14 14 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 15 # 16 16 17 + if ENV["RUBYWARDEN_ENV"] == "production" 18 + # prevent printing stack traces and other nonsense 19 + ENV["RACK_ENV"] = "deployment" 20 + end 21 + 17 22 require File.dirname(__FILE__) + "/lib/rubywarden.rb" 18 23 require "#{APP_ROOT}/lib/app.rb" 19 24