Sha256: 31e122c2a8e8b8a70efd8655e0ba318c469e00534259005a57dbf08a488b4776

Contents?: true

Size: 1.71 KB

Versions: 21

Compression:

Stored size: 1.71 KB

Contents

# frozen_string_literal: true

module NeetoCommonsBackend
  module Environments
    class << self
      def staging(config)
        config.cache_classes = true
        config.eager_load = true
        config.consider_all_requests_local = false
        config.action_mailer.delivery_method = :smtp
        config.action_mailer.perform_deliveries = true
        config.action_controller.perform_caching = true
        config.assets.js_compressor = Uglifier.new(harmony: true)
        config.assets.compile = false
        config.assets.digest = true
        config.force_ssl = true
        config.log_level = :debug
        config.active_storage.service = ENV["AWS_BUCKET_NAME"].present? ? :amazon : :local
        config.log_tags = [:request_id]
        config.i18n.fallbacks = true
        config.active_support.report_deprecations = false
        config.log_formatter = ::Logger::Formatter.new
        config.active_record.dump_schema_after_migration = false
        config.action_controller.forgery_protection_origin_check = false
        if Rails.application.secrets.asset_host.present?
          config.action_controller.asset_host = Rails.application.secrets.asset_host
        end

        config.action_cable.disable_request_forgery_protection = true
        if Rails.application.secrets.web_socket_server_url.present?
          config.web_socket_server_url = Rails.application.secrets.web_socket_server_url
          config.action_cable.url = Rails.application.secrets.web_socket_server_url
        end

        config.public_file_server.enabled = true
        config.public_file_server.headers = {
          "Access-Control-Allow-Origin" => "*",
          "Cache-Control" => "public, max-age=31536000"
        }
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
neeto-commons-backend-1.0.109 lib/neeto_commons_backend/environments/staging.rb
neeto-commons-backend-1.0.108 lib/neeto_commons_backend/environments/staging.rb
neeto-commons-backend-1.0.107 lib/neeto_commons_backend/environments/staging.rb
neeto-commons-backend-1.0.106 lib/neeto_commons_backend/environments/staging.rb
neeto-commons-backend-1.0.105 lib/neeto_commons_backend/environments/staging.rb
neeto-commons-backend-1.0.104 lib/neeto_commons_backend/environments/staging.rb
neeto-commons-backend-1.0.103 lib/neeto_commons_backend/environments/staging.rb
neeto-commons-backend-1.0.102 lib/neeto_commons_backend/environments/staging.rb
neeto-commons-backend-1.0.101 lib/neeto_commons_backend/environments/staging.rb
neeto-commons-backend-1.0.100 lib/neeto_commons_backend/environments/staging.rb
neeto-commons-backend-1.0.99 lib/neeto_commons_backend/environments/staging.rb
neeto-commons-backend-1.0.98 lib/neeto_commons_backend/environments/staging.rb
neeto-commons-backend-1.0.97 lib/neeto_commons_backend/environments/staging.rb
neeto-commons-backend-1.0.96 lib/neeto_commons_backend/environments/staging.rb
neeto-commons-backend-1.0.95 lib/neeto_commons_backend/environments/staging.rb
neeto-commons-backend-1.0.94 lib/neeto_commons_backend/environments/staging.rb
neeto-commons-backend-1.0.93 lib/neeto_commons_backend/environments/staging.rb
neeto-commons-backend-1.0.92 lib/neeto_commons_backend/environments/staging.rb
neeto-commons-backend-1.0.91 lib/neeto_commons_backend/environments/staging.rb
neeto-commons-backend-1.0.90 lib/neeto_commons_backend/environments/staging.rb