From 8afd5cea4138cf1ea00cd6eb2ae43b5e9068f7f9 Mon Sep 17 00:00:00 2001 From: Hui Miao Date: Thu, 13 Jun 2024 15:03:05 +0800 Subject: [PATCH] fix: update TAB_HOSTNAME in manifest and local config files (#11813) --- templates/csharp/sso-tab-ssr/appPackage/manifest.json.tpl | 2 +- templates/csharp/sso-tab-ssr/infra/azure.bicep | 1 + templates/csharp/sso-tab-ssr/teamsapp.local.yml.tpl | 3 ++- templates/csharp/sso-tab/appPackage/manifest.json.tpl | 2 +- templates/csharp/sso-tab/infra/azure.bicep | 1 + templates/csharp/sso-tab/teamsapp.local.yml.tpl | 3 ++- 6 files changed, 8 insertions(+), 4 deletions(-) diff --git a/templates/csharp/sso-tab-ssr/appPackage/manifest.json.tpl b/templates/csharp/sso-tab-ssr/appPackage/manifest.json.tpl index 713f2aaaa1..930bb37940 100644 --- a/templates/csharp/sso-tab-ssr/appPackage/manifest.json.tpl +++ b/templates/csharp/sso-tab-ssr/appPackage/manifest.json.tpl @@ -43,7 +43,7 @@ "messageTeamMembers" ], "validDomains": [ - "${{TAB_DOMAIN}}" + "${{TAB_HOSTNAME}}" ], "webApplicationInfo": { "id": "${{AAD_APP_CLIENT_ID}}", diff --git a/templates/csharp/sso-tab-ssr/infra/azure.bicep b/templates/csharp/sso-tab-ssr/infra/azure.bicep index b0e32fd36c..fe6dea8d84 100644 --- a/templates/csharp/sso-tab-ssr/infra/azure.bicep +++ b/templates/csharp/sso-tab-ssr/infra/azure.bicep @@ -53,4 +53,5 @@ resource webAppConfig 'Microsoft.Web/sites/config@2021-02-01' = { // The output will be persisted in .env.{envName}. Visit https://aka.ms/teamsfx-actions/arm-deploy for more details. output TAB_AZURE_APP_SERVICE_RESOURCE_ID string = webApp.id output TAB_DOMAIN string = webApp.properties.defaultHostName +output TAB_HOSTNAME string = webApp.properties.defaultHostName output TAB_ENDPOINT string = 'https://${webApp.properties.defaultHostName}' diff --git a/templates/csharp/sso-tab-ssr/teamsapp.local.yml.tpl b/templates/csharp/sso-tab-ssr/teamsapp.local.yml.tpl index 1528f03be2..f97b4c85d7 100644 --- a/templates/csharp/sso-tab-ssr/teamsapp.local.yml.tpl +++ b/templates/csharp/sso-tab-ssr/teamsapp.local.yml.tpl @@ -44,7 +44,8 @@ provision: - uses: script with: run: - echo "::set-teamsfx-env TAB_DOMAIN=localhost"; + echo "::set-teamsfx-env TAB_HOSTNAME=localhost"; + echo "::set-teamsfx-env TAB_DOMAIN=localhost:44302"; echo "::set-teamsfx-env TAB_ENDPOINT=https://localhost:44302"; # Generate runtime appsettings to JSON file diff --git a/templates/csharp/sso-tab/appPackage/manifest.json.tpl b/templates/csharp/sso-tab/appPackage/manifest.json.tpl index 713f2aaaa1..930bb37940 100644 --- a/templates/csharp/sso-tab/appPackage/manifest.json.tpl +++ b/templates/csharp/sso-tab/appPackage/manifest.json.tpl @@ -43,7 +43,7 @@ "messageTeamMembers" ], "validDomains": [ - "${{TAB_DOMAIN}}" + "${{TAB_HOSTNAME}}" ], "webApplicationInfo": { "id": "${{AAD_APP_CLIENT_ID}}", diff --git a/templates/csharp/sso-tab/infra/azure.bicep b/templates/csharp/sso-tab/infra/azure.bicep index b0e32fd36c..fe6dea8d84 100644 --- a/templates/csharp/sso-tab/infra/azure.bicep +++ b/templates/csharp/sso-tab/infra/azure.bicep @@ -53,4 +53,5 @@ resource webAppConfig 'Microsoft.Web/sites/config@2021-02-01' = { // The output will be persisted in .env.{envName}. Visit https://aka.ms/teamsfx-actions/arm-deploy for more details. output TAB_AZURE_APP_SERVICE_RESOURCE_ID string = webApp.id output TAB_DOMAIN string = webApp.properties.defaultHostName +output TAB_HOSTNAME string = webApp.properties.defaultHostName output TAB_ENDPOINT string = 'https://${webApp.properties.defaultHostName}' diff --git a/templates/csharp/sso-tab/teamsapp.local.yml.tpl b/templates/csharp/sso-tab/teamsapp.local.yml.tpl index 1528f03be2..f97b4c85d7 100644 --- a/templates/csharp/sso-tab/teamsapp.local.yml.tpl +++ b/templates/csharp/sso-tab/teamsapp.local.yml.tpl @@ -44,7 +44,8 @@ provision: - uses: script with: run: - echo "::set-teamsfx-env TAB_DOMAIN=localhost"; + echo "::set-teamsfx-env TAB_HOSTNAME=localhost"; + echo "::set-teamsfx-env TAB_DOMAIN=localhost:44302"; echo "::set-teamsfx-env TAB_ENDPOINT=https://localhost:44302"; # Generate runtime appsettings to JSON file