-
Notifications
You must be signed in to change notification settings - Fork 671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Double encoding of query #219
Comments
Thanks. I'll need to verify this and fix as part of v4. |
Hi, just saw this. I think it's the same problem I described in #241 . @karlismelderis were you using Application Load Balancer by any chance? |
I'd just like to chime in here and say I'm also running into this as an issue. In additional to the decoding, it's important to note that the Here's the solution I've been using, which effectively rebuilds the whole URL and then parses it again using the const querystring = require('querystring');
exports.handler = (event, context) => {
const qs = Object.keys(event.queryStringParameters).map(key => key + '=' + event.queryStringParameters[key]).join('&');
event.queryStringParameters = querystring.parse(qs);
ase.proxy(server, event, context);
}; That said, I'm pretty sure the behaviour of not decoding keys and values is a bug, both because of how it's inconsistent with API Gateway, and how it can't cope with certain characters (e.g. |
## [4.3.9](CodeGenieApp/serverless-express@v4.3.8...v4.3.9) (2021-06-09) ### Bug Fixes * auto-unescape query parameters on ALB ([#219](CodeGenieApp/serverless-express#219), [#241](CodeGenieApp/serverless-express#241)) ([#393](CodeGenieApp/serverless-express#393)) ([8cb4206](CodeGenieApp/serverless-express@8cb4206))
seems that query is encoded one more time when hitting express.
I had to add this peace of code before passing event to module:
The text was updated successfully, but these errors were encountered: