Add NotExists to HeaderMatchMode enum #1697
Labels
help wanted
We will welcome a contribution
Type: Documentation
Improvements or additions to documentation
Milestone
What should we add or change to make your life better?
Would like the ability to match only when a particular header is not present. This could be done by adding a
NotExists
value toHeaderMatchMode
and implement code to handle it.Why is this important to you?
In my particular scenario we have an API application that runs in multiple types of environments, such as containerized environments as well as a dedicate virtual machine. There are a couple of endpoints that don't work in the containerized environment so we use YARP to reverse-proxy those requests to the VM environment. We've also had to add some extra deployment steps so that we can set different configuration values for the containerized version and the VM version. I would like to avoid having to setup extra deployment steps by having YARP add a header so that servers downstream can know that it's being forwarded the request. Simply checking for the presence of a
X-Forwarded*
header is not sufficient as the servers upstream are behind load balancers that already get this header.Here's what I want to do:
The text was updated successfully, but these errors were encountered: