nitro icon indicating copy to clipboard operation
nitro copied to clipboard

fix(azure_functions): preserve query string in adapter handler

Open xMorthi opened this issue 3 months ago โ€ข 1 comments

๐Ÿ”— Linked issue

  • Resolves #3588

โ“ Type of change

  • [ ] ๐Ÿ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • [x] ๐Ÿž Bug fix (a non-breaking change that fixes an issue)
  • [ ] ๐Ÿ‘Œ Enhancement (improving an existing functionality like performance)
  • [ ] โœจ New feature (a non-breaking change that adds functionality)
  • [ ] ๐Ÿงน Chore (updates to the build process or auxiliary tools and libraries)
  • [ ] โš ๏ธ Breaking change (fix or feature that would cause existing functionality to change)

๐Ÿ“š Description

The azure_functions preset discards query parameters when constructing the URL passed to nitroApp.localCall. Currently it only uses:

const url = "/" + (req.params.url || "");

As a result, any query string is lost (getQuery(event) always returned {}).

This PR updates the handler to preserve the query portion from req.url (if present):

let path = "/" + (req.params.url || "");
if (req.url && req.url.includes("?")) {
  path += req.url.slice(req.url.indexOf("?"));
}

๐Ÿ“ Checklist

  • [x] I have linked an issue or discussion.
  • [ ] I have updated the documentation accordingly.

xMorthi avatar Sep 24 '25 13:09 xMorthi

@xMorthi is attempting to deploy a commit to the Nitro Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Sep 24 '25 13:09 vercel[bot]