From afe0a62f57c26307e3cf183ee2e86538b9bbf332 Mon Sep 17 00:00:00 2001 From: 8eecf0d2 <8eecf0d23d248b0e6223b8a10ddbf1@gmail.com> Date: Thu, 18 Oct 2018 07:05:30 +1100 Subject: [PATCH] fixed querystring parsing netlify/netlify-lambda#54 --- lib/serve.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/serve.js b/lib/serve.js index aa71aaf..5e55e1a 100644 --- a/lib/serve.js +++ b/lib/serve.js @@ -1,6 +1,7 @@ var express = require("express"); var bodyParser = require("body-parser"); var expressLogging = require("express-logging"); +var queryString = require("querystring"); var path = require("path"); var base64 = require("base-64"); var conf = require("./config"); @@ -70,7 +71,7 @@ function createHandler(dir, static) { var lambdaRequest = { path: request.path, httpMethod: request.method, - queryStringParameters: request.query, + queryStringParameters: queryString.parse(request.url.split("?")[1]), headers: request.headers, body: isBase64 ? base64.encode(request.body) : request.body, isBase64Encoded: isBase64