Skip to content
Discussion options

You must be logged in to vote

You can specify routing rules based on request headers, see https://microsoft.github.io/reverse-proxy/articles/header-routing.html

"myRoute" : {
  "ClusterId": "myCluster",
  "Match": {
    "Path": "{**catch-all}",
    "Headers": [
      {
        "Name": "X-Custom-Header",
        "Mode": "Exists"
      }
    ]
  }
}

You can then have a different route match the request, or let ASP.NET Core's routing reject the request if it does not match any route.

If you need more flexibility, such as a more complex decision process to determine whether to proxy the request, or sending a custom response, consider using a middleware. See https://microsoft.github.io/reverse-proxy/articles/middleware.htm…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@leastprivilege
Comment options

Answer selected by karelz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants