Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
a small http proxy to simplify routing images through an SSL host
CoffeeScript Ruby

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
log
test
tmp
.gitignore
AUTHORS
LICENSE
README.md
Rakefile
server.coffee

README.md

camo

Camo is all about making insecure assets look secure. This is an SSL image proxy to prevent mixed content warnings on secure pages served from github.

We want to allow people to keep embedding images in comments/issues/READMEs/google charting.

There's more info on the GitHub blog.

We share a key between this proxy and the main GitHub app. We encrypt the URL with hmac so we're not an open proxy. The keys come from the shell environment and are unique per deployment environment. I'm not 100% sure this step is necessary.

When the GitHub app renders markdown it replaces all of the src attributes on any img tags with the appropriate URL to hit the proxies.

Testing Functionality

Start the server

% coffee server.coffee

In another shell

% rake

Debugging

To see the full URL resclient is hitting etc, try this.

% RESTCLIENT_LOG=stdout rake

Deployment

You can see an example god config here.

To enable useful line numbers in stacktraces you probably want to compile the server.coffee file to native javascript when deploying.

% coffee -c server.coffee
% /usr/bin/env PORT=9090 CAMO_KEY="<my application key>" node server.js
Something went wrong with that request. Please try again.