Skip to content

Commit c7a5649

Browse files
fix: enforce HTTPS-only ingress for container apps
1 parent 9d7cb94 commit c7a5649

3 files changed

Lines changed: 16 additions & 2 deletions

File tree

infra/main.bicep

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,6 +1214,8 @@ module containerApp 'br/public:avm/res/app/container-app:0.22.0' = {
12141214
ingressTargetPort: 8000
12151215
ingressExternal: true
12161216
activeRevisionsMode: 'Single'
1217+
// SFI: Enforce HTTPS-only ingress. When false, HTTP requests are automatically redirected to HTTPS.
1218+
ingressAllowInsecure: false
12171219
corsPolicy: {
12181220
allowedOrigins: [
12191221
'https://${webSiteResourceName}.azurewebsites.net'
@@ -1422,6 +1424,8 @@ module containerAppMcp 'br/public:avm/res/app/container-app:0.22.0' = {
14221424
ingressTargetPort: 9000
14231425
ingressExternal: true
14241426
activeRevisionsMode: 'Single'
1427+
// SFI: Enforce HTTPS-only ingress. When false, HTTP requests are automatically redirected to HTTPS.
1428+
ingressAllowInsecure: false
14251429
corsPolicy: {
14261430
allowedOrigins: [
14271431
'https://${webSiteResourceName}.azurewebsites.net'

infra/main.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"_generator": {
77
"name": "bicep",
88
"version": "0.43.1.21952",
9-
"templateHash": "13738770643510560400"
9+
"templateHash": "11424525558363523540"
1010
},
1111
"name": "Multi-Agent Custom Automation Engine",
1212
"description": "This module contains the resources required to deploy the [Multi-Agent Custom Automation Engine solution accelerator](https://github.com/microsoft/Multi-Agent-Custom-Automation-Engine-Solution-Accelerator) for both Sandbox environments and WAF aligned environments.\r\n\r\n> **Note:** This module is not intended for broad, generic use, as it was designed by the Commercial Solution Areas CTO team, as a Microsoft Solution Accelerator. Feature requests and bug fix requests are welcome if they support the needs of this organization but may not be incorporated if they aim to make this module more generic than what it needs to be for its primary use case. This module will likely be updated to leverage AVM resource modules in the future. This may result in breaking changes in upcoming versions when these features are implemented.\r\n"
@@ -27974,9 +27974,9 @@
2797427974
},
2797527975
"dependsOn": [
2797627976
"aiFoundryAiServices",
27977-
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').cognitiveServices)]",
2797827977
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').openAI)]",
2797927978
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').aiServices)]",
27979+
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').cognitiveServices)]",
2798027980
"virtualNetwork"
2798127981
]
2798227982
},
@@ -38446,6 +38446,9 @@
3844638446
"activeRevisionsMode": {
3844738447
"value": "Single"
3844838448
},
38449+
"ingressAllowInsecure": {
38450+
"value": false
38451+
},
3844938452
"corsPolicy": {
3845038453
"value": {
3845138454
"allowedOrigins": [
@@ -40188,6 +40191,9 @@
4018840191
"activeRevisionsMode": {
4018940192
"value": "Single"
4019040193
},
40194+
"ingressAllowInsecure": {
40195+
"value": false
40196+
},
4019140197
"corsPolicy": {
4019240198
"value": {
4019340199
"allowedOrigins": [

infra/main_custom.bicep

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,6 +1241,8 @@ module containerApp 'br/public:avm/res/app/container-app:0.22.0' = {
12411241
ingressTargetPort: 8000
12421242
ingressExternal: true
12431243
activeRevisionsMode: 'Single'
1244+
// SFI: Enforce HTTPS-only ingress. When false, HTTP requests are automatically redirected to HTTPS.
1245+
ingressAllowInsecure: false
12441246
corsPolicy: {
12451247
allowedOrigins: [
12461248
'https://${webSiteResourceName}.azurewebsites.net'
@@ -1464,6 +1466,8 @@ module containerAppMcp 'br/public:avm/res/app/container-app:0.22.0' = {
14641466
ingressTargetPort: 9000
14651467
ingressExternal: true
14661468
activeRevisionsMode: 'Single'
1469+
// SFI: Enforce HTTPS-only ingress. When false, HTTP requests are automatically redirected to HTTPS.
1470+
ingressAllowInsecure: false
14671471
corsPolicy: {
14681472
allowedOrigins: [
14691473
'https://${webSiteResourceName}.azurewebsites.net'

0 commit comments

Comments
 (0)