Fix Proxy not working if no api key was set
This commit is contained in:
@@ -3,8 +3,7 @@
|
||||
"http": {
|
||||
"commandName": "Project",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development",
|
||||
"SETTINGS__ApiKey": "test123"
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
},
|
||||
"_launchUrl": "optionsTODO/example.com/api?t=movie&apikey=132&imdbid=123&limit=100",
|
||||
"dotnetRunMessages": true,
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace UmlautAdaptarr.Services
|
||||
var bytesRead = await clientStream.ReadAsync(buffer);
|
||||
var requestString = Encoding.ASCII.GetString(buffer, 0, bytesRead);
|
||||
|
||||
if (_options.ApiKey != null)
|
||||
if (!string.IsNullOrEmpty(_options.ApiKey))
|
||||
{
|
||||
var headers = ParseHeaders(buffer, bytesRead);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user