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