Skip to content
This repository has been archived by the owner on Oct 17, 2020. It is now read-only.

Commit

Permalink
Version 1.2.3.
Browse files Browse the repository at this point in the history
Support HTTP Basic authentication in application URL.
  • Loading branch information
assaf committed Jun 13, 2012
1 parent 2183d55 commit b427393
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 3 additions & 3 deletions lib/proxy.coffee
@@ -1,10 +1,7 @@
Connect = require("connect")
Cookies = require("cookies")
File = require("fs")
HTTP = require("http")
QS = require("querystring")
Keygrip = require("keygrip")
Request = require("request")
URL = require("url")
logger = require("./logger")
octolog = require("./octolog")
Expand Down Expand Up @@ -137,6 +134,9 @@ proxy = (config)->
for header of req.headers
if /^x-github/i.test(header)
delete req.headers[header]
# Support HTTP Basic authentication is specified in the application URL
if url.auth
req.headers["Authorization"] = "Basic #{new Buffer(url.auth).toString("base64")}"
# Forward
rev_proxy.proxyRequest(req, res)

Expand Down
4 changes: 1 addition & 3 deletions package.json
@@ -1,5 +1,5 @@
{ "name": "octolog",
"version": "1.2.2",
"version": "1.2.3",
"description": "Github is our single sign-on octopus",
"author": "Assaf Arkin <assaf@labnotes.org> (http://labnotes.org/)",
"main": "index",
Expand All @@ -13,11 +13,9 @@
"node": ">= 0.6.0"
},
"dependencies": {
"async": "~0.1.18",
"coffee-script": "~1.3.1",
"cookies": "~0.2.2",
"connect": "~1.8.6",
"express": "~2.5.9",
"http-proxy": "~0.8.0",
"keygrip": "~0.2.0",
"request": "~2.9.200",
Expand Down

0 comments on commit b427393

Please sign in to comment.