Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
CloudEvents validation with APIM
<inbound>
<base />
<!-- Get the WebHook-Request-Origin -->
<set-variable value="@(context.Request.Headers.GetValueOrDefault("WebHook-Request-Origin"))"
name="webhookRequestOrigin" />
<!--
Return the response with the allowed origin
and allowed rate to confirm the subscription.
-->
<return-response>
<set-status code="200" reason="OK" />
<set-header name="WebHook-Allowed-Origin" exists-action="override">
<value>@((string)context.Variables["webhookRequestOrigin"])</value>
</set-header>
<set-header name="WebHook-Allowed-Rate" exists-action="override">
<value>*</value>
</set-header>
<set-body />
</return-response>
</inbound>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment