Setting Proxy as a middleware for rails 3