Document Kestrel response header encoding
hi Chris @Tratcher / @MihaZupan / @karelz .. i'm trying to use yarp and facing this encoding issue due to a downstream system returning non-ASCII chars in the response header. since I don't have control over the downstream system, I am trying to see how we can be more tolerant at yarp's end.
now that aspnetcore/~kerner~ kestrel is updated (thanks Chris!) to optionally be more tolerant to non-ASCII characters, how can we tell yarp to leverage the tolerance. is there something similar to RequestHeaderEncoding coming up? (maybe something like ResponseHeaderEncoding or such!)
I was hoping this documentation update issue might help make that clear. even if someone can give a TL;DR on how to achieve this without this documentation-update-issue being resolved, it'd be great.
You don't need to do anything YARP specific, you configure the Kestrel options directly in your proxy app.
ah sorry. thanks @Tratcher. i'll try something via appSettings.. or even code like the below.
builder.WebHost.ConfigureKestrel(serverOptions =>
{
serverOptions.ResponseHeaderEncodingSelector = _ => System.Text.Encoding.Unicode;
});