I’m wondering if there is any solution to simply denying any request that doesnt adhere to the defined combination of the defined Resources and Request Verb.
Solutions I had in mind;
Create a Routerule that triggers when one of the combinations are not found (please note that this will be difficult because the target endpoint is of type OData, so the proxy.pathsuffix becomes very long because the query is included. )
Implement a threat protection policy that triggers when the pathsuffix doesnt start with the known resources.
Only fill the endpoint url in case one of the resources were found in a Condition.
But I hope there is a better solution. Thanks in advance!
Typically we recommend you have defined Flow definitions for each resource and verb supported in the default.xml. If that is the case, the last Flow step triggers a RaiseFault as in the example below:
<Flow name="Default">
<Description>Catch any other access and throw a 404 Fault</Description>
<Request>
<Step>
<Name>raiseUnknownResource</Name>
</Step>
</Request>
<Response/>
</Flow>