Skip to content

fixRequestBody does not handle Content-Type text/plain, even though bodyParser.text exists #1102

@knudtty

Description

@knudtty

Checks

Describe the bug (be clear and concise)

fixRequestBody is supposed to "Fix proxied body if bodyParser is involved", so it should handle all cases of bodyParser. One of those is bodyParser.text, which handles requests with content-type of text/plain. There is currently no case that handles that, so one should be added.

Step-by-step reproduction instructions

1. ...
2. ...

Expected behavior (be clear and concise)

fixRequestBody should write to the request body for Content-Type text/plain.

How is http-proxy-middleware used in your project?

Forwarding requests for an /api route to a separate running api

What http-proxy-middleware configuration are you using?

version 3.0.3

What OS/version and node/version are you seeing the problem?

N/A

Additional context (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions