Skip to content

Commit a0e100d

Browse files
author
Maddie Clayton
authored
Merge pull request Azure#7244 from akshaysngupta/release
#Network AppGw listener bug fix
2 parents 1f07dbd + c384cf2 commit a0e100d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/ResourceManager/Network/Commands.Network/ApplicationGateway/HttpListener/AzureApplicationGatewayHttpListenerBase.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,19 @@ public PSApplicationGatewayHttpListener NewObject()
108108
httpListener.Protocol = this.Protocol;
109109
httpListener.HostName = this.HostName;
110110

111-
if(string.Equals(this.RequireServerNameIndication,"true", StringComparison.OrdinalIgnoreCase))
111+
if (string.Equals(this.RequireServerNameIndication, "true", StringComparison.OrdinalIgnoreCase))
112112
{
113113
httpListener.RequireServerNameIndication = true;
114114
}
115-
else if(string.Equals(this.RequireServerNameIndication, "false", StringComparison.OrdinalIgnoreCase))
115+
else if (string.Equals(this.RequireServerNameIndication, "false", StringComparison.OrdinalIgnoreCase))
116116
{
117117
httpListener.RequireServerNameIndication = false;
118118
}
119+
else if (string.Equals(this.Protocol, "https", StringComparison.OrdinalIgnoreCase) && !string.IsNullOrEmpty(this.HostName))
120+
{
121+
// Set default as true to be at parity with portal.
122+
httpListener.RequireServerNameIndication = true;
123+
}
119124

120125
if (!string.IsNullOrEmpty(this.FrontendIPConfigurationId))
121126
{

0 commit comments

Comments
 (0)