Files: f83d698b779a4f4f4741c60a9a611d947ffafb44 / config / application.rb
1651 bytesRaw
1 | require File.expand_path('../boot', __FILE__) |
2 | |
3 | require 'rails/all' |
4 | # require "action_controller/railtie" |
5 | # require "action_mailer/railtie" |
6 | # require "sprockets/railtie" |
7 | # require "rails/test_unit/railtie" |
8 | |
9 | # Require the gems listed in Gemfile, including any gems |
10 | # you've limited to :test, :development, or :production. |
11 | Bundler.require(*Rails.groups) |
12 | |
13 | module Bitboat |
14 | class Application < Rails::Application |
15 | # Settings in config/environments/* take precedence over those specified here. |
16 | # Application configuration should go into files in config/initializers |
17 | # -- all .rb files in that directory are automatically loaded. |
18 | |
19 | # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. |
20 | # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC. |
21 | # config.time_zone = 'Central Time (US & Canada)' |
22 | |
23 | # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. |
24 | # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] |
25 | # config.i18n.default_locale = :de |
26 | |
27 | # config.browserify_rails.source_map_environments << "development" |
28 | |
29 | # COMPRESS SHIZZLE |
30 | config.middleware.use Rack::Deflater |
31 | |
32 | config.middleware.insert_before 0, "Rack::Cors", :debug => true, :logger => (-> { Rails.logger }) do |
33 | allow do |
34 | origins '*' |
35 | |
36 | resource '/fonts/*', |
37 | :headers => :any, |
38 | :methods => [:get] |
39 | |
40 | resource '*', |
41 | :headers => :any, |
42 | :methods => [:get, :post, :delete, :put, :patch, :options, :head], |
43 | :max_age => 0 |
44 | end |
45 | end |
46 | end |
47 | end |
48 |
Built with git-ssb-web