Skip to content

CustomAuth #1155

Answered by Tratcher
flow2010 asked this question in Q&A
Discussion options

You must be logged in to vote

Option 1) Add a transform to a specific route:
https://microsoft.github.io/reverse-proxy/articles/transforms.html#from-code

.AddTransforms(transformBuilderContext =>
{
// For each route+cluster pair decide if we want to add transforms, and if so, which?
// This logic is re-run each time a route is rebuilt.
transformBuilderContext.AddPathPrefix("/prefix");
// Only do this for routes that require auth.
if (string.Equals("token", transformBuilderContext.Route.AuthorizationPolicy))
{
transformBuilderContext.AddRequestTransform(async transformContext =>

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
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