Skip to content

Commit be95a51

Browse files
committed
fix: add CORS allowed origin for custom domain
1 parent 03a6163 commit be95a51

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

infra/main.bicep

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ module apiApp 'modules/container-app.bicep' = if (!empty(apiImage)) {
100100
{ name: 'AzureOpenAI__Endpoint', value: azureOpenAIEndpoint }
101101
{ name: 'AzureOpenAI__DeploymentName', value: azureOpenAIDeploymentName }
102102
{ name: 'APPLICATIONINSIGHTS_CONNECTION_STRING', value: monitoring.outputs.appInsightsConnectionString }
103+
{ name: 'Cors__AllowedOrigins__0', value: !empty(webCustomDomain) ? 'https://${webCustomDomain}' : '' }
103104
], !empty(apiKey) ? [{ name: 'API_KEY', secretRef: 'api-key' }] : [])
104105
additionalSecrets: !empty(apiKey) ? [{ name: 'api-key', value: apiKey }] : []
105106
}

0 commit comments

Comments
 (0)