korolvs/thatsaboy

View on GitHub
api/config/application.rb

Summary

Maintainability
A
0 mins
Test Coverage
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 Kidsboards
  class Application < Rails::Application
    # Libs
    config.autoload_paths += %W(#{config.root}/lib)
    # CORS
    config.middleware.insert_before 0, Rack::Cors do
      allow do
        origins '*'
        resource '*', :headers => :any, :methods => [:get, :post, :delete, :put, :patch, :options, :head]
      end
    end
  end
end