Module: Middleman::Features::Proxy::ClassMethods

Defined in:
lib/middleman-proxy.rb

Instance Method Summary collapse

Instance Method Details

#proxy(path, options = {}) ⇒ Object

Proxies requests to the path

require 'middleman-proxy'
activate :proxy

proxy '/an_api_path', :to => "your-api-hostname.com"
proxy '/ssl_api_path', :to => "your-other-api-hostname.com", :secure => true


52
53
54
# File 'lib/middleman-proxy.rb', line 52

def proxy(path, options={})
  Middleman::Features::Proxy::Collection.add(path, options)
end