STUPIDLY
SIMPLE
PROXYING IN
RAILS
PAM SELLE, COMCAST INTERACTIVE MEDIA
ABOUT ME
- Engineer for Xfinity.com
- Comcast Interactive Media
- Ruby
- JavaScript (PhillyJSDev!)
WHAT?
A proxy is an intermediary used for two servers talking to
another.
BUT WHY?
- JavaScript!
- CORS
- … but we can’t always have nice things
LET’S TALK ABOUT : RACK
User
Rack::Proxy
Authentication Layer
Rails
Engines
RACK::PROXY
- Disclaimer: We use our own lib
- Gem! Rack Streaming Proxy
https://github.com/zerowidth/rack-streaming-proxy...
RACK PROXY DEMO!
THANKS!
Pam Selle
@pamasaur
thewebivore.com
Upcoming SlideShare
Loading in …5
×

Simple Proxying in Rails

747 views

Published on

A lightning talk given for #PTW14 Dev Day describing simple proxying in Rails as an alternative path to being able to use CORS.

Published in: Engineering
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
747
On SlideShare
0
From Embeds
0
Number of Embeds
118
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • 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
  • Simple Proxying in Rails

    1. 1. STUPIDLY SIMPLE PROXYING IN RAILS PAM SELLE, COMCAST INTERACTIVE MEDIA
    2. 2. ABOUT ME - Engineer for Xfinity.com - Comcast Interactive Media - Ruby - JavaScript (PhillyJSDev!)
    3. 3. WHAT? A proxy is an intermediary used for two servers talking to another.
    4. 4. BUT WHY? - JavaScript! - CORS - … but we can’t always have nice things
    5. 5. LET’S TALK ABOUT : RACK User Rack::Proxy Authentication Layer Rails Engines
    6. 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”
    7. 7. RACK PROXY DEMO!
    8. 8. THANKS! Pam Selle @pamasaur thewebivore.com

    ×