A URL with duplicate query params is interpreted different between local development and once deployed to the XDN. For example, https://www.mysite.com/site?url=https%3A%2F%2Fwww.xxx.com&url=https%3A%2F%2Fwww.yyy.com
The base of my handler is as follows:
export default async function site(req, res) {
console.log(`Incoming query string: ${JSON.stringify(req.query)}`)
...
}
Locally, I get a single url
property with an Array of values:
Incoming query string: {“url”:[“https://www.xxx.com”,“https://www.yyy.com”]}
When I view the server logs from the XDN, I see that the query contains individual properties for each of the duplicate params:
12:11:13.947 INFO: info -
12:11:14.190 INFO: Incoming query string: {“url”:“https://www.xxx.com”}
12:11:54.549 INFO: Incoming query string: {“url[0]”:“https://www.xxx.com”,“url[1]”:“https://www.yyy.com”}