mirror of
https://github.com/okieselbach/AutopilotMonitor.git
synced 2026-10-24 12:42:38 +00:00
CORS fix
This commit is contained in:
@@ -1 +1 @@
|
||||
663
|
||||
664
|
||||
|
||||
@@ -90,6 +90,13 @@ public class AuthenticationMiddleware : IFunctionsWorkerMiddleware
|
||||
return;
|
||||
}
|
||||
|
||||
// CORS preflight requests are handled by the Azure Functions host — let them through
|
||||
if (string.Equals(httpContext.Request.Method, "OPTIONS", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
await next(context);
|
||||
return;
|
||||
}
|
||||
|
||||
// Allow anonymous routes without JWT validation
|
||||
var requestPath = httpContext.Request.Path.Value ?? string.Empty;
|
||||
if (IsAnonymousRoute(requestPath))
|
||||
|
||||
Reference in New Issue
Block a user