Sha256: 5d58c7afd895ee0955c7e4a497ad6ebdc166c544106f5b306be043c0dd8dafd6

Contents?: true

Size: 792 Bytes

Versions: 48

Compression:

Stored size: 792 Bytes

Contents

require 'rack/cors'
require 'jsonapi-serializers'
require 'groupdate'
require 'net/http'
require 'useragent'
require 'jwt'
require 'bcrypt'
require_relative 'bootstraper'
require_relative 'collection'

module ForestLiana
  class Engine < ::Rails::Engine
    isolate_namespace ForestLiana

    config.middleware.insert_before 0, 'Rack::Cors' do
      allow do
        hostnames = ['localhost:4200', 'app.forestadmin.com',
                     'www.forestadmin.com']
        hostnames += ENV['CORS_ORIGINS'].split(',') if ENV['CORS_ORIGINS']

        origins hostnames
        resource '*', headers: :any, methods: :any
      end
    end

    config.after_initialize do |app|
      unless Rails.env.test?
        app.eager_load!
        Bootstraper.new(app).perform
      end
    end
  end
end

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
forest_liana-1.3.47 lib/forest_liana/engine.rb
forest_liana-1.3.46 lib/forest_liana/engine.rb
forest_liana-1.3.45 lib/forest_liana/engine.rb
forest_liana-1.3.44 lib/forest_liana/engine.rb
forest_liana-1.3.43 lib/forest_liana/engine.rb
forest_liana-1.3.42 lib/forest_liana/engine.rb
forest_liana-1.3.41 lib/forest_liana/engine.rb
forest_liana-1.3.40 lib/forest_liana/engine.rb
forest_liana-1.3.39 lib/forest_liana/engine.rb
forest_liana-1.3.38 lib/forest_liana/engine.rb
forest_liana-1.3.37 lib/forest_liana/engine.rb
forest_liana-1.3.36 lib/forest_liana/engine.rb
forest_liana-1.3.35 lib/forest_liana/engine.rb
forest_liana-1.3.34 lib/forest_liana/engine.rb
forest_liana-1.3.33 lib/forest_liana/engine.rb
forest_liana-1.3.32 lib/forest_liana/engine.rb
forest_liana-1.3.31 lib/forest_liana/engine.rb
forest_liana-1.3.30 lib/forest_liana/engine.rb
forest_liana-1.3.29 lib/forest_liana/engine.rb
forest_liana-1.3.28 lib/forest_liana/engine.rb