add: hci
This commit is contained in:
@@ -13,12 +13,13 @@ public class WebhookAuthFilter : IEndpointFilter
|
||||
}
|
||||
public async ValueTask<object?> InvokeAsync(EndpointFilterInvocationContext context, EndpointFilterDelegate next)
|
||||
{
|
||||
var expectedToken = Environment.GetEnvironmentVariable("WebhookAuth__RequiredApiToken");
|
||||
var allowedOrigin = Environment.GetEnvironmentVariable("WebhookAuth__AllowedOrigin");
|
||||
var expectedToken = Environment.GetEnvironmentVariable("HCI_WEBHOOK_AUTH_TOKEN");
|
||||
var allowedOrigin = Environment.GetEnvironmentVariable("HCI_WEBHOOK_AUTH_ALLOW_ORIGIN");
|
||||
|
||||
if (string.IsNullOrEmpty(expectedToken) || string.IsNullOrEmpty(allowedOrigin))
|
||||
{
|
||||
_logger.LogCritical("Required environment variables 'WebhookAuth__RequiredApiToken' or 'WebhookAuth__AllowedOrigin' are not set.");
|
||||
_logger.LogCritical("Required environment variables 'HCI_WEBHOOK_AUTH_TOKEN' or 'HCI_WEBHOOK_AUTH_TOKEN' are not set.");
|
||||
_logger.LogInformation($"token: {expectedToken}, allowedOrigin: {allowedOrigin}");
|
||||
return Results.StatusCode((int)HttpStatusCode.InternalServerError);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user