I’m using Strapi v3, but perhaps this applies to v4.
I noticed duplicate query params are automatically merged into an array. Is this intentional? What’s the benefit?
Is it upon a dev to manually check for this when digesting params in a custom controller?
Any suggestions on how to control this at a high-level… ie to NOT merge duplicate query params, instead only take the first instance and ignore the rest.
Duplicate query params:
/myposts?_limit=50&_limit=30
ctx.query {
_limit: [ '50', '30' ]
}
vs
Single query param:
/myposts?_limit=50
ctx.query {
_limit: '50'
}