-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
As per the rails upgrade guide[1] I ran rails app:update and then rubocop -A to bring the code generated by rails app:update into line with our style guide. I discarded any changes that removed code we'd explicitly added to, for example, config/application.rb. [1] https://guides.rubyonrails.org/upgrading_ruby_on_rails.html We hadn't set the `config.force_ssl` option to true back when the app was created in 2b09a14. It feels like the kind of thing that might cause an issue, so I've decided to leave it unset with this upgrade too.
- Loading branch information
Showing
15 changed files
with
448 additions
and
44 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# frozen_string_literal: true | ||
|
||
# Be sure to restart your server when you modify this file. | ||
|
||
# Version of your assets, change this if you want to expire all your assets. | ||
Rails.application.config.assets.version = '1.0' | ||
|
||
# Add additional assets to the asset load path. | ||
# Rails.application.config.assets.paths << Emoji.images_path | ||
|
||
# Precompile additional assets. | ||
# application.js, application.css, and all non-JS/CSS in the app/assets | ||
# folder are already added. | ||
# Rails.application.config.assets.precompile += %w( admin.js admin.css ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,24 @@ | ||
# frozen_string_literal: true | ||
|
||
# Be sure to restart your server when you modify this file. | ||
|
||
origins_array = ENV['ALLOWED_ORIGINS']&.split(',')&.map(&:strip) || [] | ||
# Handle Cross-Origin Resource Sharing (CORS) in order to accept cross-origin Ajax requests. | ||
|
||
Rails.application.config.middleware.insert_before 0, Rack::Cors do | ||
allow do | ||
origins origins_array | ||
resource '*', headers: :any, methods: %i[get post patch put delete], expose: ['Link'] | ||
end | ||
end | ||
# Read more: https://github.com/cyu/rack-cors | ||
|
||
# Rails.application.config.middleware.insert_before 0, Rack::Cors do | ||
# allow do | ||
# origins "example.com" | ||
# | ||
# resource "*", | ||
# headers: :any, | ||
# methods: [:get, :post, :put, :patch, :delete, :options, :head] | ||
# end | ||
# end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.