Skip to content

Commit

Permalink
Binding HostName to Deployment slot uses name incorrectly. (#250)
Browse files Browse the repository at this point in the history
* Fixed an issue with the incorrect deployment slot name being used when binding hostnames.

* Update LICENSE.txt
  • Loading branch information
steveofficer authored and praries880 committed Apr 30, 2019
1 parent 303240f commit 4d2913f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

4 changes: 2 additions & 2 deletions src/ResourceManagement/AppService/HostNameBindingImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ public HostNameBindingImpl<FluentT, FluentImplT, DefAfterRegionT, DefAfterGroupT
///GENMHASH:32A8B56FE180FA4429482D706189DEA2:9462BB1488F8B757A53382E31550B2EC
public async Task<IHostNameBinding> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))
{
var hostNameBindingInner = parent is IDeploymentSlot
? await parent.Manager.Inner.WebApps.CreateOrUpdateHostNameBindingSlotAsync(parent.ResourceGroupName, ((IDeploymentSlot)parent).Parent.Name, name, Inner, parent.Name)
var hostNameBindingInner = parent is IDeploymentSlot deploymentSlot
? await parent.Manager.Inner.WebApps.CreateOrUpdateHostNameBindingSlotAsync(parent.ResourceGroupName, deploymentSlot.Parent.Name, name, Inner, deploymentSlot.Name)
: await parent.Manager.Inner.WebApps.CreateOrUpdateHostNameBindingAsync(parent.ResourceGroupName, parent.Name, name, Inner);
SetInner(hostNameBindingInner);

Expand Down

0 comments on commit 4d2913f

Please sign in to comment.