mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-04-23 00:32:50 +08:00
Fix incorrect response StatusCode for middleware added before Ocelot (#380)
This commit is contained in:
parent
3bde18f6f8
commit
095406bd45
@ -59,12 +59,8 @@ namespace Ocelot.Responder
|
||||
}
|
||||
|
||||
public void SetErrorResponseOnContext(HttpContext context, int statusCode)
|
||||
{
|
||||
context.Response.OnStarting(x =>
|
||||
{
|
||||
context.Response.StatusCode = statusCode;
|
||||
return Task.CompletedTask;
|
||||
}, context);
|
||||
}
|
||||
|
||||
private static void AddHeaderIfDoesntExist(HttpContext context, Header httpResponseHeader)
|
||||
|
Loading…
x
Reference in New Issue
Block a user