Proxy fix to enable API usage
This commit is contained in:
parent
911a80b500
commit
6dbc844462
1 changed files with 5 additions and 2 deletions
|
@ -82,8 +82,11 @@ namespace Ksp.WebServer
|
||||||
opt.WithHttpClientName("RedirectClient");
|
opt.WithHttpClientName("RedirectClient");
|
||||||
|
|
||||||
opt.WithBeforeSend((cx, request) => {
|
opt.WithBeforeSend((cx, request) => {
|
||||||
request.Headers.Authorization =
|
if (request.Headers.Authorization is null)
|
||||||
new AuthenticationHeaderValue("Basic", "SECRET");
|
{
|
||||||
|
request.Headers.Authorization =
|
||||||
|
new AuthenticationHeaderValue("Basic", "SECRET");
|
||||||
|
}
|
||||||
if (request.Headers.Referrer is object)
|
if (request.Headers.Referrer is object)
|
||||||
request.Headers.Referrer =
|
request.Headers.Referrer =
|
||||||
new UriBuilder(request.Headers.Referrer) {
|
new UriBuilder(request.Headers.Referrer) {
|
||||||
|
|
Reference in a new issue