Skip to content

Commit 913446c

Browse files
committed
req.protocol does not contain ':'
Relying on req.protocol currently gives 404 errors on the middleware calls. This commit fixes that.
1 parent 05d4310 commit 913446c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Application.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ Application.prototype.bridgeCalls = function(c1, c2) {
144144
Application.prototype.middleware = function() {
145145
var app = this;
146146
return function(req, res, next) {
147-
var protocol = req.protocol || (req.app instanceof tls.Server ? "https:" : "http:");
147+
var protocol = (req.protocol || (req.app instanceof tls.Server ? "https" : "http")) + ':';
148148
var voiceURL = url.parse(app.VoiceUrl, false, true),
149149
voiceStatus = url.parse(app.StatusCallback, false, true),
150150
smsURL = url.parse(app.SmsUrl, false, true),

0 commit comments

Comments
 (0)