Hi buddies, I have 2 apps in production on Heroku. One is the real one named prod and the second one is the test app named dev. I don't want people and bots access my dev app. I read about wwwhisper on Heroku, does somebody faces the issue and could suggest me a solution? Thanks Kevin
If you wanna stay in the Rails environment, you can use a snippet like this one:
# config/application.rb if ENV['HTTP_AUTH_ENABLED'] == 'true' config.middleware.use '::Rack::Auth::Basic' do |username, password| [username, password] == [ENV['HTTP_AUTH_USERNAME'], ENV['HTTP_AUTH_PASSWORD']] end end # config/application.yml staging: HTTP_AUTH_ENABLED: "true" HTTP_AUTH_USERNAME: "keuvain" HTTP_AUTH_PASSWORD: "coucoulechat"
Thanks I'm gonna explore both! <3