我正在尝试为使用EventGridTrigger的 Azure 函数创建 EventGridSubscription。运行New-AzureRmEventGridSubscription cmdlet 时,我看到以下错误:
网址验证:尝试验证提供的端点https://blablafunction.azurewebsites.net/admin/EventGridExtensionConfig失败。
这是天蓝色的功能代码:
[FunctionName("BlobCreatedHandler")]
public static async Task Run([EventGridTrigger]JObject blobEvent,
[Queue("blob-created-queue", Connection = Strings.StorageAccountConnection)] CloudQueue blobCreatedQueue,
[Inject(typeof(IBlobCreatedHandler))] IBlobCreatedHandler blobCreatedHandler)
{
await blobCreatedHandler.Handle(blobEvent, blobCreatedQueue);
}
我尝试了不同版本的 AzureRM.EventGrid 模块。有趣的是,在低于 0.3.0 的版本上它可以正常工作。但是从 0.3.1 开始的所有最新版本都因此错误而失败。有人有同样的经历吗?
UPD: Fiddler 说两个版本的 SDK(好的版本和坏版本)都发送完全相同的请求:
{
"properties": {
"destination": {
"endpointType": "WebHook",
"properties": {
"endpointUrl": "https://blobmalwarescanapptest.azurewebsites.net/admin/EventGridExtensionConfig?functionName=TestFunc&code=PhWghMXtSma188UQccaoErA4Eiw7ygudguHkpq1V0XKMfzA59yBR5g=="
}
},
"filter": {
"includedEventTypes": [
"All"
],
"isSubjectCaseSensitive": false
}
}
并得到完全相同的回应。但是在较新版本的 SDK 上,Azure EventGrid 管理端点似乎会截断“?”之后的所有内容。签名并尝试验证基本 url(没有查询参数)。