Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix twitter auth behind proxy #24

Merged
merged 1 commit into from

2 participants

@cartuchogl

No description provided.

@jed jed merged commit a805156 into jed:master
@jed
Owner

cool, thanks @cartuchogl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 11, 2012
  1. @cartuchogl
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/services/twitter.js
View
3  lib/services/twitter.js
@@ -18,7 +18,8 @@ function Twitter(options) {
Twitter.prototype = new EventEmitter
Twitter.prototype.parseURI = function(request) {
- var protocol = request.socket.encrypted ? "https" : "http"
+ var proto = (request.headers["x-forwarded-proto"] || "").toLowerCase()
+ , protocol = request.socket.encrypted || proto == 'https' ? "https" : "http"
, host = request.headers.host || request.connection.remoteAddress
return url.parse(protocol + "://" + host + request.url, true)
Something went wrong with that request. Please try again.