Fix Proxy not working if no api key was set

This commit is contained in:
pcjones
2025-01-13 23:01:14 +01:00
parent e81a956cc4
commit aa3765bcf2
2 changed files with 2 additions and 3 deletions

View File

@@ -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,

View File

@@ -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);