Skip to content

Commit

Permalink
fixed querystring parsing netlify/netlify-lambda#54
Browse files Browse the repository at this point in the history
  • Loading branch information
8eecf0d2 authored and blkblihong committed Nov 14, 2019
1 parent 6626e69 commit afe0a62
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/serve.js
Original file line number Diff line number Diff line change
@@ -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");
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit afe0a62

Please sign in to comment.