Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration Changes To Support Rails 6+ #430

Closed
aaronskiba opened this issue Aug 31, 2023 · 1 comment · Fixed by #474
Closed

Configuration Changes To Support Rails 6+ #430

aaronskiba opened this issue Aug 31, 2023 · 1 comment · Fixed by #474

Comments

@aaronskiba
Copy link
Collaborator

aaronskiba commented Aug 31, 2023

According to the v4.0.0 release notes New Configuration::

"The following is a list of configuration changes you will need to make to your local installations to support Rails 6+:

  1. New environment variable called DMPROADMAP_HOST. Rails 6+ introduces new middleware that helps mitigate DNS rebinding attacks. This includes a hostname whitelist. The whitelist includes localhost for the development environment, but does not include anything in other environments. Set export DMPROADMAP_HOST=my.example.org appropriately for each environment. If you have other hostnames you need to support, you can adjust the config/application.rb file to include them.

  2. We needed to reconfigure the config/translation.rb so that it does not reference Rails framework elements that have not yet been defined. Please review this file and adjust the SUPPORTED_LOCALES, CLIENT_LOCALES and DEFAULT_LOCALE constants at the top as needed."

@aaronskiba
Copy link
Collaborator Author

aaronskiba commented Sep 1, 2023

  1. DMPROADMAP_HOST='assistant.portagenetwork.ca'

    • Also, find and replace 'example.org' with 'assistant.portagenetwork.ca' within the occurrences of ENV.fetch('DMPROADMAP_HOST', 'example.org').
  2. This code excerpt is taken from release v4.0.0 config/initialializers/translation.rb:

    # Note that the entries here must have a corresponding directory in config/locale, a
    # YAML file in config/locales and should also have an entry in the DB's languages table
    SUPPORTED_LOCALES = %w[de en-CA en-GB en-US es fi fr-CA fr-FR pt-BR sv-FI tr-TR].freeze
    # You can define a subset of the locales for your instance's version of Translation.io if applicable
    CLIENT_LOCALES = %w[de en-CA en-GB en-US es fi fr-CA fr-FR pt-BR sv-FI tr-TR].freeze
    DEFAULT_LOCALE = 'en-GB'
    
    • Should our constants be defined as follows(?):
      SUPPORTED_LOCALES = %w[en-CA en-GB fr-CA].freeze
      CLIENT_LOCALES = %w[en-CA en-GB fr-CA].freeze

    DEFAULT_LOCALE = 'en-GB'

    • If yes to the above, then should remove unneeded .yml files from config/locales (see the attached screenshot)?
      Screenshot from 2023-09-01 15-09-24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant