Skip to content

Removes port from target #985

@Netail

Description

@Netail

Checks

Describe the bug (be clear and concise)

When a target with a port is given, it gets proxied to the domain without port.
E.g. when using http://127.0.0.1:3001 as a target, it will proxy to http://127.0.0.1

Step-by-step reproduction instructions

1. Set target to http://127.0.0.1:3001
2. Use the proxy 
3. Redirects to the url without the port

Expected behavior (be clear and concise)

Go to the correct port

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

- "_project_#custom-proxy" depends on it
   - Hoisted from "_project_#custom-proxy#http-proxy-middleware"

What http-proxy-middleware configuration are you using?

3.0.0 - createProxyMiddleware()

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

MacOS 14.4.1 - Node v20.8.1

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