0.0
No commit activity in last 3 years
No release in over 3 years
Proxy request helper for yours Rails routes.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

 Project Readme

proxy_request

proxy_request is a simple helper to Rails routes. It's usefull for eg. making local Ajax request to remote sites.

Rails 3.x compatibile

Installation

just add gem to Gemfile:

gem 'proxy_request'

Usage

and in routes.rb, use new helper proxy_request to proxy request to other url

match 'proxy/*all' => proxy_request('http://other.api.com/%{all}')

proxy_request by default validates CSRF protection for every http method ( GET, POST ... ).

To disable it just set :csrf option to false

match 'api/*all' => proxy_request('http://other.api.com/%{all}', :csrf => false )
Copyright

Kamil Załęski, http://kamilzaleski.com