Skip to content

QueryParams are not re-appended in fromParameters #450

@traineira

Description

@traineira

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the bug has not already been reported

Fastify version

5.8.2

Plugin version

11.4.1

Node.js version

latest

Operating system

macOS

Operating system version (i.e. 20.04, 11.3, 10)

15.3.1

Description

QueryParams are not re-appended in fromParameters if the prefix does not include ":", here

This way we loose the queryParams when we use this function.

Link to code that reproduces the bug

https://github.com/fastify/fastify-http-proxy/blob/204a3d0b58de717695cbec615efbf11b255b9507/index.js#L725

Expected Behavior

The queryParams should be re-appended in both scenarios. We should add here the following

if (queryParams) {
  dest += `?${qs.stringify(queryParams)}`
}

and remove from here

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions