Skip to content

Commit 7b1a299

Browse files
Only apply key filter to the Alpaca APIs
1 parent f6978d7 commit 7b1a299

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

ASCOM.Alpaca.Simulators/Controllers/BaseController.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ public class ProcessBaseController : Controller
1414
{
1515
internal bool BadRequestAlpacaProtocol(out BadRequestObjectResult Result)
1616
{
17+
Result = null;
18+
//Only check on Alpaca routes, all others may pass
19+
if (!HttpContext.Request.Path.ToString().Contains("api/"))
20+
{
21+
return false;
22+
}
1723

1824
if (HttpContext.Request.Path.ToString().Any(char.IsUpper))
1925
{
@@ -40,7 +46,7 @@ internal bool BadRequestAlpacaProtocol(out BadRequestObjectResult Result)
4046
Logging.Log.LogError($"Error on request {HttpContext.Request.Path} with details: {Result.Value?.ToString()}");
4147
return true;
4248
}
43-
Result = null;
49+
4450
return false;
4551
}
4652

0 commit comments

Comments
 (0)