Files
timeoverflow/config/application.rb
Pau Perez 52a02eb6be Allow non-www host name
As far as I know our DNS provider redirects itself timeoverflow.org to
www.timeoverflow.org instead of our Nginx, as we are used to, but we're
seeing people getting ERR_CONNECTION_REFUSED, with mobile data only,
they say. We hope this may fix it but we're totally blind here.
2021-01-07 13:37:43 +01:00

42 lines
1.5 KiB
Ruby

require File.expand_path('../boot', __FILE__)
require 'rails/all'
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
module Timeoverflow
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
config.load_defaults 6.0
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de
config.i18n.default_locale = :es
config.i18n.available_locales = [:es, :ca, :eu, :gl, :en, :'pt-BR']
config.i18n.fallbacks = true
# This tells Rails to serve error pages from the app itself, rather than using static error pages in public/
config.exceptions_app = self.routes
# Activate the Skylight agent in staging. You need to provision the
# SKYLIGHT_AUTHENTICATION env var for this to work.
config.skylight.environments += ["staging"]
# ActiveJob configuration
config.active_job.queue_adapter = :sidekiq
# Use db/structure.sql with SQL as schema format
# This is needed to store in the schema SQL statements not covered by the ORM
config.active_record.schema_format = :sql
# Guard against DNS rebinding attacks by permitting hosts
config.hosts << 'timeoverflow.local'
config.hosts << 'staging.timeoverflow.org'
config.hosts << 'www.timeoverflow.org'
config.hosts << 'timeoverflow.org'
end
end