forked from AdaGold/video-store-consumer-api
-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathapplication.rb
More file actions
25 lines (21 loc) · 805 Bytes
/
application.rb
File metadata and controls
25 lines (21 loc) · 805 Bytes
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
require_relative 'boot'
require 'rack/cors'
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 VideoStoreAPIRails
class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
#this loads everything in the lib folder automatically
config.eager_load_paths << Rails.root.join('lib')
config.middleware.insert_before 0, Rack::Cors do
allow do
origins '*'
resource '*', headers: :any, methods: [:get, :post, :options]
end
end
end
end