5. LET’S TALK ABOUT : RACK
User
Rack::Proxy
Authentication Layer
Rails
Engines
6. RACK::PROXY
- Disclaimer: We use our own lib
- Gem! Rack Streaming Proxy
https://github.com/zerowidth/rack-streaming-proxy
- “Streaming proxy for Rack, the rainbows to Rack::Proxy's
unicorn”
A proxy is a little like playing a game of telephone
Why would you need a proxy? Sometimes you need an intermediary- needed to talk to another server with JavaScript - causes cross-domain issues – Luckily, CORS (cross origin resource sharing), but it’s the OTHER server that has the rules. But .. CORS doesn’t work in earlier versions of IE (8 (9?))
Before we get to the simple proxying, let’s detour to understand Rack, which we’ll base our proxy on.Rack is like building blocks. A Ruby app is often based on