Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

initial import of some stuff

  • Loading branch information...
commit 274a1789a85fbb463d72c024c7dd90383b6dbe07 0 parents
Corey Donohoe authored
2  .gitignore
@@ -0,0 +1,2 @@
+tmp/asset-proxy.pid
+server.js
2  AUTHORS
@@ -0,0 +1,2 @@
+Rick Olson: https://github.com/technoweenie
+Corey Donohoe: https://github.com/atmos
20 LICENSE
@@ -0,0 +1,20 @@
+Copyright (c) 2010 Corey Donohoe, Rick Olson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
36 README.md
@@ -0,0 +1,36 @@
+# asset-proxy
+
+This is an image SSL proxy to prevent mixed content warnings on secure pages served from http://github.com.
+
+We wanted to allow people to keep embedding image links in their comments and README files. This also handles inlining google charts images.
+
+[More Info Here](https://github.com/blog/743-sidejack-prevention-phase-3-ssl-proxied-assets)
+
+We share a key between this proxy and the GitHub main app. We encrypt the URL with [hmac](http://en.wikipedia.org/wiki/HMAC) so we're not an open proxy. These 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 an 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](https://gist.github.com/675038) here.
+
+To enable useful line numbers in stacktraces you probably want to
+compile the server.coffee file to native javascript when deploy
+
+ % coffee -c server.coffee
+ % node server.js
6 Rakefile
@@ -0,0 +1,6 @@
+namespace :test do
+ task :check do |t|
+ system("ruby test/proxy_test.rb")
+ end
+end
+task :default => "test:check"
0  log/.gitignore
No changes.
0  tmp/.gitignore
No changes.
Please sign in to comment.
Something went wrong with that request. Please try again.