-
Notifications
You must be signed in to change notification settings - Fork 519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hosting Dashboard from child path (https://domain/my/child/path) does not appear to work correctly #4159
Comments
it is not only the base href tag, all js sources, rely on hosting direclty on root path (/). |
This is an issue for the Blazor aspect of the Dashboard. If it's being hosted at a deeper url than expected, then the paths for loading other resources such as css or json will be wrong if they use absolute URLs. @adityamandaleeka @benjaminpetit to confirm my memory for proxy related thoughts. |
@samsp-msft , For Blazor Server app, in <head>
<!-- ... -->
<base href="@_systemOptions.Value.DeploymentBaseHref" />
<!-- ... -->
</head> |
We probably want a config property (an env var) for the base URI so that can be set in k8s etc for the standalone dashboard, as it will need to be the URI that the client accesses not the URI the dashboard is actually hosted at. |
This will allow the aspire app to handle running behind a reverse proxy such as a k8s ingress on a subpath dotnet#4159 dotnet#4528 dotnet#5134
I created a PR for this #6963 |
I am trying to host the aspire dashboard from k8s running on AKS using nginx as an ingress controller and running into some issues. I would essentially like to host the dashboard from:
https://mydomainhere/dev/aspire/dashboard
Using aspirate to generate some basic config I have managed to successfully deploy the dashboard out via helm and can access it from the above URL - it however immediately redirects to
https://mydomainhere/structuredlogs
I believe it should be trying to redirect to
https://mydomainhere/dev/aspire/dashboard/structuredlogs
I can put that directly into the browser and it then fails due to it trying to load js/css resources from
https://mydomainhere/
I presume this might be related to it deploying out with a
<base href="/">
I tried to see if setting
ASPNETCORE_URLS
as mentioned here https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/dashboard/configuration#common-configuration might help but that just leads to an error on startup:I don't think I can "fix" this issue via ingress config as I have multiple other web apps running so can't just, for example, redirect any traffic to
https://mydomainhere/
back out tohttps://mydomainhere/dev/aspire/dashboard
Is this a scenario that is not currently supported? Any advice would be greatly appreciated, thank you!
The text was updated successfully, but these errors were encountered: