-
Notifications
You must be signed in to change notification settings - Fork 501
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
Adding basepath to the config #6963
base: main
Are you sure you want to change the base?
Conversation
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add test coverage in ValidateDashboardOptions
.
url = QueryHelpers.AddQueryString(url, "language", language); | ||
url = QueryHelpers.AddQueryString(url, "redirectUrl", redirectUrl); | ||
|
||
return url; | ||
} | ||
|
||
internal static void SetBasePath(string pathBase) => BasePath = pathBase; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem like an optimal way to update BasePath
to me. If DashboardUrls
is going to store this state, it should be turned into a service and injected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am following the SetLanguageUrl
method above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It’s different, as SetLanguageUrl does not set state. It only returns the url for the set language url path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. Is this something that will block the feature from being accepted?
@JamesNK for review |
Tests added |
rerunning the PR checks
The options changes look fine, but this is a one liner in middleware https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.builder.usepathbaseextensions.usepathbase?view=aspnetcore-9.0. You can undo all of the other changes you made. |
This will allow the aspire app to handle running behind a reverse proxy such as a k8s ingress on a subpath #4159
#4528
#5134
Description
Added a new dashboard base path option, integrated it into the Dashboard Option, validated and replaced all areas that are creating the links
Fixes # (issue)
Checklist
<remarks />
and<code />
elements on your triple slash comments?breaking-change
template):doc-idea
template):Microsoft Reviewers: Open in CodeFlow