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):
- Update your BrowserRouter by adding a
basename. Example: <BrowserRouter history={history} basename="/webapp">.
- Specify a homepage on your package.json. Example:
"homepage": "/webapp".
- 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. :-)
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):
basename. Example:<BrowserRouter history={history} basename="/webapp">."homepage": "/webapp".src="/static/logo/logo.png"becomessrc="/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. :-)