OWASP recommends that you not only send the X-Frame-Options header, but also set it to DENY.
These recommendations are not for the website, but for the REST service.
The scenario in which it makes sense to do this is exactly the one that the OP mentioned - launching a vulnerability scan.
If you do not return the correct X-Frame-Options header, the scan will fail. This is important when you prove to customers that your endpoint is safe.
It is much easier to provide your client with a missing report than to argue why the missing header does not matter.
Adding an X-Frame-Options header should not affect the endpoint user, as he is not an iframe browser.
Steve chadbourne
source share