-
-
Notifications
You must be signed in to change notification settings - Fork 84
Open
Description
Hi @twitchax,
I am trying to solve folowing scenario:
- I have SomeController
- This controller contains few GET and POST endpoints
- I want to proxy only GET endpoints
I was trying with RunProxy middleware UseHttp and HttpContext as an input like this:
`
application.RunProxy(proxyBuilder =>
{
proxyBuilder.UseHttp((context, args) =>
{
if (context.Request.Method == "GET" && context.Request.Path.StartsWithSegments("/api/v1/some"))
{
return "dest_url";
}
return ???
});
});
`
But still need return something if condition was not met, null or empty string not working. :/
It seems this middleware usage suggest to proxy all request somewhere?
Is there any other solution rather than this?
Something like this, but only MapGet?
Thanks in advance for your help.
volago
Metadata
Metadata
Assignees
Labels
No labels