I noticed after removing VirtualHost "default" ( the https endpoint is retained) from proxy endpoint , users hitting the http endpoint get following error message from Apigee;
{ "fault": { "faultstring": "Unable to identify proxy for host: default and url: /basepath/xyz", "detail": { "errorcode": "messaging.adaptors.http.flow.ApplicationNotFound" } } }
How can this error be handled? Can we force Apigee to not send any repsonse instead of this error message ?
You need to invoke https:// endpoints (and stop calling http://), since you only have secure VirtualHost configuration on your API proxy. AFAIK you can't force Edge not to send any response when someone invokes a bad URL. One workaround is to check the VirtualHost name in the Proxy and reply with an error or a custom message asking consumers to use https.
You can catch any unmatched API calls to your org/environment by implementing a "catch all" proxy that listens on basepath "/" with no target. Add a simple Raise Fault and send back a nicer message (e.g 404 Not Found).
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |