Sha256: 8df016c73dfd74266f8a7cdbf8ab7b750551702d5a7436c253a3397d423ed316

Contents?: true

Size: 417 Bytes

Versions: 15

Compression:

Stored size: 417 Bytes

Contents

module Litestream
  class ApplicationController < ActionController::Base
    protect_from_forgery with: :exception
    around_action :force_english_locale!

    if Litestream.password
      http_basic_authenticate_with(
        name: Litestream.username,
        password: Litestream.password
      )
    end

    private

    def force_english_locale!(&action)
      I18n.with_locale(:en, &action)
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
litestream-0.12.0 app/controllers/litestream/application_controller.rb
litestream-0.12.0-x86_64-linux app/controllers/litestream/application_controller.rb
litestream-0.12.0-x86_64-darwin app/controllers/litestream/application_controller.rb
litestream-0.12.0-arm64-linux app/controllers/litestream/application_controller.rb
litestream-0.12.0-arm64-darwin app/controllers/litestream/application_controller.rb
litestream-0.11.2 app/controllers/litestream/application_controller.rb
litestream-0.11.2-x86_64-linux app/controllers/litestream/application_controller.rb
litestream-0.11.2-x86_64-darwin app/controllers/litestream/application_controller.rb
litestream-0.11.2-arm64-linux app/controllers/litestream/application_controller.rb
litestream-0.11.2-arm64-darwin app/controllers/litestream/application_controller.rb
litestream-0.11.1-x86_64-darwin app/controllers/litestream/application_controller.rb
litestream-0.11.1 app/controllers/litestream/application_controller.rb
litestream-0.11.1-x86_64-linux app/controllers/litestream/application_controller.rb
litestream-0.11.1-arm64-linux app/controllers/litestream/application_controller.rb
litestream-0.11.1-arm64-darwin app/controllers/litestream/application_controller.rb