Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSupport case insensitive query parameters #2644
Comments
|
Yes of course! Would you like to send a PR? Note that you can work around this pretty easily by overwriting https://www.fastify.io/docs/latest/Server/#querystringparser, which would by recommended fix, e.g. call |
|
I won't be able to access my computer next week, so if someone wants to fix it before they are more than welcome. Otherwise I'll have a look in a week time |
|
I'm happy to take a look into this today :-) |
|
Great, thanks! |
Include a lowercase formatting when the case sensitive option is disabled fastify#2644
By setting the caseSensitive option to false, it also gets applied to query strings, not only routes. See fastify#2644.
|
Hey, guys, I've just opened a PR to address this issue but there are some things to consider about this, which I commented in the PR: #2649 |
|
Looks like someone else beat me to it |
|
I'm sorry, @julesnuggy :( |
Could it be possible to support an optional case insentive option for query parameters? Adding the option
caseSensitive: falsedoes not seems to impact query parametersMotivation
For backward compatibilitites you sometime need to support multiple casing
Example
With that code
Both tests below should pass