You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In lower/dev environments, hosting Stoplight Elements behind something like a software load balancer/proxy (Traefik/Fabio/Nginx, etc) can sometimes mean that they are accessed via a subfolder-like path.
Example URL: https://lb.internal.fqdn/fancy-app/docs
In the example above, the load balancers can be configured to strip the /fancy-app piece of the request when forwarding the request on to my application.
Today I can get this to work by ensuring the basePath is aware of the /fancy-app URI to properly load the OpenAPI spec provided. I can get the UI to load once by having router="history". However, the moment the page loads, the URL gets re-written to remove the /fancy-app component of the URL.
Once https://lb.internal.fqdn/fancy-app/docs loads, it immediately shows https://lb.internal.fqdn/docs. Using any of the other routers simply fails to load the docs entirely.
My question
Is there a way to configure Stoplight to not rewrite the URL in this scenario? I assume there is something specific to React (or whichever framework Stoplight uses) where this would be configured, if it is even possible.
Current Situation
In lower/dev environments, hosting Stoplight Elements behind something like a software load balancer/proxy (Traefik/Fabio/Nginx, etc) can sometimes mean that they are accessed via a subfolder-like path.
Example URL:
https://lb.internal.fqdn/fancy-app/docs
In the example above, the load balancers can be configured to strip the
/fancy-app
piece of the request when forwarding the request on to my application.Today I can get this to work by ensuring the
basePath
is aware of the/fancy-app
URI to properly load the OpenAPI spec provided. I can get the UI to load once by havingrouter="history"
. However, the moment the page loads, the URL gets re-written to remove the/fancy-app
component of the URL.Once
https://lb.internal.fqdn/fancy-app/docs
loads, it immediately showshttps://lb.internal.fqdn/docs
. Using any of the other routers simply fails to load the docs entirely.My question
Is there a way to configure Stoplight to not rewrite the URL in this scenario? I assume there is something specific to React (or whichever framework Stoplight uses) where this would be configured, if it is even possible.
References
basePath
.Current Config
The text was updated successfully, but these errors were encountered: