Skip to content

Commit

Permalink
Adding IP based SSL support
Browse files Browse the repository at this point in the history
  • Loading branch information
shibayan committed Aug 8, 2018
1 parent 8276184 commit a66a0f9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions AzureLetsEncrypt/AddCertificate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static async Task RunOrchestrator([OrchestrationTrigger] DurableOrchestra

// ACME Challenge のために Kudu API でファイルを作成
await context.CallActivityAsync(nameof(SharedFunctions.Authorization), (site, authzUrl));

if (!await context.CallActivityAsync<bool>(nameof(SharedFunctions.WaitChallenge), orderDetails))
{
log.LogError($"Cannot generate certificate: {hostNameSslState.Name}");
Expand All @@ -56,7 +56,7 @@ public static async Task RunOrchestrator([OrchestrationTrigger] DurableOrchestra
await context.CallActivityAsync(nameof(SharedFunctions.UpdateCertificate), (site, $"{hostNameSslState.Name}-{thumbprint}", pfxBlob));

hostNameSslState.Thumbprint = thumbprint;
hostNameSslState.SslState = SslState.SniEnabled;
hostNameSslState.SslState = request.UseIpBasedSsl ?? false ? SslState.IpBasedEnabled : SslState.SniEnabled;
hostNameSslState.ToUpdate = true;

await context.CallActivityAsync(nameof(SharedFunctions.UpdateSiteBinding), site);
Expand Down Expand Up @@ -99,5 +99,6 @@ public class AddCertificateRequest
public string ResourceGroupName { get; set; }
public string SiteName { get; set; }
public string Domain { get; set; }
public bool? UseIpBasedSsl { get; set; }
}
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Build status](https://ci.appveyor.com/api/projects/status/bhbdscxn7f33ne1p?svg=true)](https://ci.appveyor.com/project/shibayan/azure-appservice-letsencrypt)

This functions provide automation of Let's Encrypt for Azure App Service. This project started to solve some problems.
This function provide automation of Let's Encrypt for Azure App Service. This project started to solve some problems.

- Support multiple app services
- Simple deployment and configuration
Expand Down Expand Up @@ -61,7 +61,7 @@ Run `AddCertificate_HttpStart` function with parameters.
```sh
curl https://***.azurewebsites.net/api/AddCertificate_HttpStart?code=*** -X POST \
-H 'Content-Type:application/json' \
-d "{"ResourceGroupName":"***","SiteName":"***","Domain":"***"}"
-d "{"ResourceGroupName":"***","SiteName":"***","Domain":"***","UseIpBasedSsl":(true/false)}"
```

### Renew certificates
Expand Down

0 comments on commit a66a0f9

Please sign in to comment.