Skip to content

Suggestion to allow path delivery #8

@malnor

Description

@malnor

A thought or suggestion that might help others then me..

I have a rather big project using a lot of ingress routing to match different paths to different microservices. I would really love to serve this redoc at /docs, the problem is that react is still fetching the resources from the root, so it can't find them. This can be solved by (not sure all steps are included):

  1. Update your BrowserRouter by adding a basename. Example: <BrowserRouter history={history} basename="/webapp">.
  2. Specify a homepage on your package.json. Example: "homepage": "/webapp".
  3. Referencing a static file by it's relative path, you should add the subdirectory to that reference. Example: src="/static/logo/logo.png" becomes src="/webapp/static/logo/logo.png"

I'm not sure if it would be possible to actually do this by configuration - haven't tried but it would be really nice. :-)

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