From f941ec9dd8143735479881894ecea885a60c263a Mon Sep 17 00:00:00 2001 From: "Simon J.K. Pedersen" Date: Mon, 3 Apr 2017 23:48:53 +0200 Subject: [PATCH] #119 --- LetsEncrypt.SiteExtension.Core/KuduHelper.cs | 2 +- LetsEncrypt.SiteExtension.Core/KuduRestClient.cs | 7 ++++--- LetsEncrypt.nuspec | 2 +- LetsEncrypt64.nuspec | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/LetsEncrypt.SiteExtension.Core/KuduHelper.cs b/LetsEncrypt.SiteExtension.Core/KuduHelper.cs index 95f8407..d120e3d 100644 --- a/LetsEncrypt.SiteExtension.Core/KuduHelper.cs +++ b/LetsEncrypt.SiteExtension.Core/KuduHelper.cs @@ -14,7 +14,7 @@ public static KuduRestClient GetKuduClient(this WebSiteManagementClient client, { var user = client.WebApps.GetPublsihingCredentialSiteOrSlot(settings.ResourceGroupName, settings.WebAppName, settings.SiteSlotName); - return new KuduRestClient(settings.WebAppName, user.PublishingUserName, user.PublishingPassword); + return new KuduRestClient(settings, settings.WebAppName, user.PublishingUserName, user.PublishingPassword); } } } diff --git a/LetsEncrypt.SiteExtension.Core/KuduRestClient.cs b/LetsEncrypt.SiteExtension.Core/KuduRestClient.cs index 25fc11d..3288c5c 100644 --- a/LetsEncrypt.SiteExtension.Core/KuduRestClient.cs +++ b/LetsEncrypt.SiteExtension.Core/KuduRestClient.cs @@ -1,4 +1,5 @@ -using Newtonsoft.Json; +using LetsEncrypt.SiteExtension.Models; +using Newtonsoft.Json; using System; using System.IO; using System.Net.Http; @@ -15,12 +16,12 @@ public class KuduRestClient private string publishingUserName; private string webAppName; - public KuduRestClient(string webAppName, string publishingUserName, string publishingPassword) + public KuduRestClient(IAzureEnvironment azureEnvironment, string webAppName, string publishingUserName, string publishingPassword) { this.webAppName = webAppName; this.publishingUserName = publishingUserName; this.publishingPassword = publishingPassword; - this.baseUri = $"https://{this.webAppName}.scm.azurewebsites.net"; + this.baseUri = $"https://{this.webAppName}.scm.{azureEnvironment.AzureWebSitesDefaultDomainName}"; this.client = new HttpClient(); client.BaseAddress = new System.Uri(baseUri); client.DefaultRequestHeaders.TryAddWithoutValidation("Authorization", CreateToken()); diff --git a/LetsEncrypt.nuspec b/LetsEncrypt.nuspec index ce390fa..5ce0db4 100644 --- a/LetsEncrypt.nuspec +++ b/LetsEncrypt.nuspec @@ -3,7 +3,7 @@ letsencrypt Azure Let's Encrypt (x86) - 0.6.13 + 0.6.14 SJKP http://opensource.org/licenses/Apache-2.0 https://github.com/sjkp/letsencrypt-siteextension diff --git a/LetsEncrypt64.nuspec b/LetsEncrypt64.nuspec index d3324cb..24c55e8 100644 --- a/LetsEncrypt64.nuspec +++ b/LetsEncrypt64.nuspec @@ -3,7 +3,7 @@ letsencrypt64 Azure Let's Encrypt (x64) - 0.6.13 + 0.6.14 SJKP http://opensource.org/licenses/Apache-2.0 https://github.com/sjkp/letsencrypt-siteextension