Skip to content

Instantly share code, notes, and snippets.

@jwietelmann
Created January 14, 2016 22:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jwietelmann/39cfe77eef8e7506cddc to your computer and use it in GitHub Desktop.
Save jwietelmann/39cfe77eef8e7506cddc to your computer and use it in GitHub Desktop.
"keep in mind that there are a few things here that don't work super well: Jekyll dies if you're missing a trailing slash. it appears to handle that internally by always redirecting to a url with a trailing slash. presumably there's some regular expression or something that we could use to handle the cases, but I didn't have time to solve that p…
require File.expand_path('../boot', __FILE__)
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 MyProject
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.
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
# config.time_zone = 'Central Time (US & Canada)'
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de
# Do not swallow errors in after_commit/after_rollback callbacks.
config.active_record.raise_in_transactional_callbacks = true
config.autoload_paths += %W(#{config.root}/app/uploaders #{config.root}/app/importers)
config.generators do |generate|
generate.helper false
generate.assets false
generate.view_specs false
generate.template_engine false
end
config.react.addons = true
# example config for rack reverse proxy to point at wordpress. currently
# points at the revelry blog.
config.middleware.insert_before(Rack::Runtime, Rack::ReverseProxy) do
reverse_proxy_options preserve_host: true
reverse_proxy(%r{^\/blog(\/.*)$}, 'http://revelry.co/blog/$1')
reverse_proxy(%r{^\/js(\/.*)$}, 'http://revelry.co/js$1')
reverse_proxy(%r{^\/css(\/.*)$}, 'http://revelry.co/css$1')
reverse_proxy(%r{^\/img(\/.*)$}, 'http://revelry.co/img$1')
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment