rewrite to destination with query parms
Unanswered
Acorn Woodpecker posted this in #help-forum
Acorn WoodpeckerOP
im trying to create a rewrite, where the destination has a constant query param, however the query param is not working
ex:
the query params received by
ex:
rewrites() {
return [
{
source: "/assets/logo/icon-only",
destination: "/api/assets/logo?displayType=icon-only"
}
]
}
the query params received by
/api/assets/logo
are undefined, due to req.url
being /assets/logo/icon-only
, not /api/assets/logo?displayType=icon-only