Skip to content
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

Add RedirectHttpResult.IsLocalUrl() #57363

Merged
merged 1 commit into from
Aug 16, 2024
Merged

Conversation

martincostello
Copy link
Member

@martincostello martincostello commented Aug 16, 2024

Add RedirectHttpResult.IsLocalUrl()

Add IsLocalUrl(string?) method to RedirectHttpResult.

Description

Add IsLocalUrl(string?) method to RedirectHttpResult, which is just a wrapper around SharedUrlHelper.IsLocalUrl().

Nullable annotations and documentation taken from IUrlHelper.IsLocalUrl().

Fixes #56770

Add `IsLocalUrl()` method to `RedirectHttpResult`, which is just a wrapper around `SharedUrlHelper.IsLocalUrl()`.

Resolves dotnet#56770.
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions label Aug 16, 2024
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Aug 16, 2024
@martincostello martincostello added area-minimal Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc and removed community-contribution Indicates that the PR has been added by a community member area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions labels Aug 16, 2024
@dotnet-policy-service dotnet-policy-service bot added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions labels Aug 16, 2024
Copy link
Member

@captainsafia captainsafia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this receives the honor of being the first new public API in ASP.NET Core for .NET 10!

@captainsafia captainsafia merged commit 8fd758f into dotnet:main Aug 16, 2024
26 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the 10.0-preview1 milestone Aug 16, 2024
@martincostello martincostello deleted the gh-56770 branch August 16, 2024 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-minimal Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose method for testing for a local URL consumable without depending on MVC
2 participants