CloudEvents validation with APIM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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