Sha256: b31a7a7ea6f9616a0b6c87ffde851d7442d4c226248a6b59e792b574bb5f7dd8

Contents?: true

Size: 933 Bytes

Versions: 1

Compression:

Stored size: 933 Bytes

Contents

module Quintype::Routes
  class Railtie < Rails::Railtie
    config.quintype_routes = ActiveSupport::OrderedOptions.new

    initializer "quintype-routes.register_routes" do |app|
      api_host = app.config.quintype_routes.quintype_host
      app.config.middleware.insert_before(Rack::Runtime, Rack::ReverseProxy) do
        reverse_proxy '/api', api_host
        reverse_proxy '/login', api_host
        reverse_proxy '/auth.form', api_host
        reverse_proxy '/auth.callback', api_host
        reverse_proxy /^\/auth$/, api_host
        reverse_proxy '/admin', api_host
        reverse_proxy '/shrubbery', api_host
        reverse_proxy '/sitemap', api_host
        reverse_proxy '/feed', api_host
        reverse_proxy '/rss-feed', api_host
        reverse_proxy '/stories.rss', api_host
        reverse_proxy '/news_sitemap.xml', api_host
        reverse_proxy '/qlitics.js', api_host
      end if api_host
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
quintype-routes-0.1.5 lib/quintype/routes/railtie.rb