From 8fb78b183c8183449e292f2fa753e87c5cccae5d Mon Sep 17 00:00:00 2001 From: marktyers Date: Sun, 3 May 2015 18:04:55 +0000 Subject: [PATCH] corrected missing protocol in image URL --- labs/16 File System/file_upload.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/labs/16 File System/file_upload.js b/labs/16 File System/file_upload.js index ef64885..8e89082 100644 --- a/labs/16 File System/file_upload.js +++ b/labs/16 File System/file_upload.js @@ -28,7 +28,7 @@ server.get('/', function(req, res) { console.log('GET'); fs.readdir('images/', function(err, files) { var data = files.map(function(value) { - return req['headers.x-forwarded-proto']+'://'+req.headers.host+'/images/'+value; + return req.headers['x-forwarded-proto']+'://'+req.headers.host+'/images/'+value; }); res.send(data); res.end();