Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/azure-cli/azure/cli/command_modules/appservice/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -2503,6 +2503,17 @@ def create_webapp_slot(cmd, resource_group_name, webapp, slot, configuration_sou
slot_def = Site(server_farm_id=site.server_farm_id, location=location)
slot_def.site_config = SiteConfig()

# Do not clone site config when cloning from production
if configuration_source and configuration_source.lower() == webapp.lower():
slot_def.site_config = None

# Match cloned site settings from Azure portal
slot_def.https_only = site.https_only
slot_def.client_cert_enabled = site.client_cert_enabled
slot_def.client_cert_mode = site.client_cert_mode
slot_def.client_cert_exclusion_paths = site.client_cert_exclusion_paths
slot_def.public_network_access = site.public_network_access

# if it is a Windows Container site, at least pass the necessary
# app settings to perform the container image validation:
if configuration_source and site_config.windows_fx_version:
Expand Down
Loading