-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
backendcomponent:ci-cdCI/CD workflow componentCI/CD workflow componentcomponent:terraformTerraform and state managementTerraform and state managementconfigurationpriority:P1Highest priorityHighest prioritytype:bugDefectDefect
Description
Problem
Frontend in SWA 108dev fails with CORS when calling APIM configuration endpoint.
Evidence
- Browser console error:
- Access to XMLHttpRequest at https://tutor-108dev-apim.azure-api.net/api/configuration/themes
- Origin: https://nice-flower-0be65ed0f.1.azurestaticapps.net
- Message: No Access-Control-Allow-Origin header is present on preflight response.
- Live APIM policy for configuration-api currently includes only localhost origins:
Reproduction
- Open https://nice-flower-0be65ed0f.1.azurestaticapps.net
- Go to Configuration screen.
- Observe request to /api/configuration/themes failing with CORS preflight error.
Impact
- User impact: Critical in dev environment (frontend cannot read configuration data).
- Blast radius: Cross-service API access through APIM for browser clients.
Acceptance Criteria
- APIM policy for all service-edge APIs includes current SWA origin for active environment.
- OPTIONS preflight to /api/configuration/themes returns Access-Control-Allow-Origin for SWA origin.
- Frontend Configuration page loads without CORS errors.
- A workflow-based remediation path exists (no manual portal edits required).
- Add automated validation to fail CI if required SWA origin is missing from APIM CORS policy.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
backendcomponent:ci-cdCI/CD workflow componentCI/CD workflow componentcomponent:terraformTerraform and state managementTerraform and state managementconfigurationpriority:P1Highest priorityHighest prioritytype:bugDefectDefect