简体   繁体   中英

Forward HTTP requests with Rails

是否有某种方法可以通过Rails将任何传入的HTTP请求原样转发到其他网站,而不管请求类型及其数据如何?

In theory yes, you can collect a request headers, payload and details, and perform an HTTP request to another target reproducing the same request environment (cookies, headers, etc) effectively proxying the request... but I definitely think Rails is not the best solution for that.

You should definitely use a different approach and technology, for instance HAproxy or Nginx.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM