Skip to content

Commit a79ffd3

Browse files
committed
Rename WhatsApp:ProcessSecret options
1 parent 2c341ed commit a79ffd3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/WhatsApp/AzureFunctionsProcessors.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ public async Task<IActionResult> HandleEventGrid(
3333
public async Task<IActionResult> ProcessAsync(
3434
[HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = "whatsapp/process")] HttpRequest req)
3535
{
36-
if (string.IsNullOrEmpty(options.Secret) ||
36+
if (string.IsNullOrEmpty(options.ProcessSecret) ||
3737
!req.Headers.TryGetValue("X-WHATSAPP-SECRET", out var values) ||
38-
!options.Secret.Equals(values.ToString(), StringComparison.Ordinal))
38+
!options.ProcessSecret.Equals(values.ToString(), StringComparison.Ordinal))
3939
return new UnauthorizedResult();
4040

4141
using var reader = new StreamReader(req.Body, Encoding.UTF8);

src/WhatsApp/WhatsAppOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ public class WhatsAppOptions
5757
/// If used, the incoming POST request must have the X-WHATSAPP-SECRET
5858
/// header set and it must match exactly the value of this option.
5959
/// </remarks>
60-
public string? Secret { get; set; }
60+
public string? ProcessSecret { get; set; }
6161
}

0 commit comments

Comments
 (0)