mirror of
https://github.com/okieselbach/AutopilotMonitor.git
synced 2026-10-24 20:53:06 +00:00
CORS fix
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
"mcpServers": {
|
||||
"autopilot-monitor": {
|
||||
"type": "streamable-http",
|
||||
"url": "https://autopilotmonitor-mcp.azurecontainerapps.io/mcp"
|
||||
"url": "https://autopilotmonitor-mcp.kindwave-58b4b547.westeurope.azurecontainerapps.io/mcp"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
662
|
||||
663
|
||||
|
||||
@@ -50,6 +50,13 @@ public class PolicyEnforcementMiddleware : IFunctionsWorkerMiddleware
|
||||
var requestPath = httpContext.Request.Path.Value ?? string.Empty;
|
||||
var httpMethod = httpContext.Request.Method;
|
||||
|
||||
// CORS preflight requests are handled by the Azure Functions host — let them through
|
||||
if (string.Equals(httpMethod, "OPTIONS", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
await next(context);
|
||||
return;
|
||||
}
|
||||
|
||||
// Look up the catalog policy for this route
|
||||
var catalogEntry = EndpointAccessPolicyCatalog.FindPolicy(httpMethod, requestPath);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user