Azure / azure-functions-on-container-apps

Docs , samples and issues for Azure Functions on Azure Container Apps
MIT License
64 stars 15 forks source link

Options / Preflight request returns 404 even if CORS is configured to allow requests from subdomains using wildcard (*) #64

Open AkshayMorey-BB opened 1 week ago

AkshayMorey-BB commented 1 week ago

Which trigger/binding are you using? HttpTrigger

Which language are you using? C#

Expected behavior Options/Preflight request should succeed for subdomains added with wildcard (*)

Actual behavior Options/Preflight requests returns 404 if CORS is configured with wildcard (*) subdomain. The request succeeds if complete domain name is added.

Screenshots failed_config failed_req success_config success_req

raorugan commented 1 week ago

@AkshayMorey-BB - can you please provide resource details like Function App name and Resource id

AkshayMorey-BB commented 1 week ago

@raorugan This can be replicated on azure portal by creating a function with dotnet8-quickstart-demo image as well. The Test/Run for HttpExample function succeeds if "https://portal.azure.com" is added to CORS allowed origins, but fails - with the options requests returning 404, if allowed origin is changed to "https://*.azure.com".