-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapplication.rb
52 lines (40 loc) · 1.59 KB
/
application.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# frozen_string_literal: true
require_relative 'boot'
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 Atlas
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
config.load_defaults 7.1
# Please, add to the `ignore` list any other `lib` subdirectories that do
# not contain `.rb` files, or that should not be reloaded or eager loaded.
# Common ones are `templates`, `generators`, or `middleware`, for example.
config.autoload_lib(ignore: %w[assets tasks])
config.autoload_paths += %W[
#{config.root}/app/services
]
config.generators do |generate|
generate.stylesheets false
generate.javascripts false
generate.helpers false
end
config.middleware.insert_before 0, Rack::Cors do
allow do
origins '*'
resource '/graphql', headers: :any, methods: %i[options get put post]
resource '/graph', headers: :any, methods: %i[options get put post]
resource '/graph/*', headers: :any, methods: %i[options get put post]
end
end
config.middleware.use BatchLoader::Middleware
# For Rails 7.1: Configure your mailer to use Active Job
config.action_mailer.deliver_later_queue_name = :mailers
config.action_mailer.perform_deliveries = true
# For Rails 7.1: Set Time Zone
config.time_zone = 'UTC'
# Use credentials for secret key base
config.secret_key_base = credentials.secret_key_base
end
end