microsoft / microsoft/aspire

Yarp: Enable 301/302 redirects

Open
#13,692 2 comments 0 reactions 0 assignees View on GitHub
area-integrations yarp
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Is your feature request related to a problem? Please describe the problem.

I'm trying to have the yarp proxy that is configured redirect "/" to "/help/openapi" so that the help documentation on the help project is displayed by default on the root both for dev and deploy.

I can't find any way to do what you can easily do in a C# yarp project that does the 301 redirect.

### Describe the solution you'd like

proxy.WithConfiguration(yarp => yarp.AddRedirect("/", "/help/openapi")

### Additional context

This would then do a redirect automatically and the proxy wout then handle it because I have /help mapped ccordingly.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.