Skip to content

Basepath not retained in proxied requests #518

Closed
@norelina

Description

@norelina

Bug description

Basepath not retained in proxied requests when using route created in CHP

image

How to reproduce

  1. Run a simple React app locally
  2. Run CHP locally using configurable-http-proxy --port 8500 --log-level debug
  3. Create a route for the React app
  4. Try to access the React app through the proxy

Expected behaviour

Static files cannot be loaded and return 404s. Trying to load it using: http://localhost:8500/static/js/bundle.js

image

Actual behaviour

The basepath /react of the route is not maintained.

Static file should be loaded by: http://localhost:8500/react/static/js/bundle.js

Notes:

  • When we add the --no-include-prefix the file is indeed available in route http://localhost:8500/react/static/js/bundle.js (we would expect the opposite), but the basepath is still not maintained.
  • Absolute paths are used for the static files (this is not something we have control over in our case)
image

Your personal set up

This has been reproduced in Windows 11, Mac, and also in an Azure Kubernetes cluster.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions