Proxy fix to enable API usage

This commit is contained in:
Standa Lukeš 2020-10-03 22:18:24 +00:00
parent 911a80b500
commit 6dbc844462

View file

@ -82,8 +82,11 @@ namespace Ksp.WebServer
opt.WithHttpClientName("RedirectClient");
opt.WithBeforeSend((cx, request) => {
request.Headers.Authorization =
new AuthenticationHeaderValue("Basic", "SECRET");
if (request.Headers.Authorization is null)
{
request.Headers.Authorization =
new AuthenticationHeaderValue("Basic", "SECRET");
}
if (request.Headers.Referrer is object)
request.Headers.Referrer =
new UriBuilder(request.Headers.Referrer) {