Closed
Platform / Eventing Platform
XmlHttpRequest callouts can bypass a RemoteSiteSetting
Summary
Requests to external sites in JavaScript code using XmlHttpRequest in a custom button can go through even though the site is not whitelisted in the Remote Site Settings page.
The document said that it is need to register in Remote site settings,
- Help:
Configure Remote Site Settings
https://help.salesforce.com/articleView?id=sf.configuring_remoteproxy.htm&type=5
-----
Before any Visualforce page, Apex callout, or JavaScript code using XmlHttpRequest in an s-control or custom button can call an external site,
that site must be registered in the Remote Site Settings page, or the call fails.
-----
but actually it can call external site in JavaScript code using XmlHttpRequest in a custom button without Remote Site Settings.
The document said that it is need to register in Remote site settings,
- Help:
Configure Remote Site Settings
https://help.salesforce.com/articleView?id=sf.configuring_remoteproxy.htm&type=5
-----
Before any Visualforce page, Apex callout, or JavaScript code using XmlHttpRequest in an s-control or custom button can call an external site,
that site must be registered in the Remote Site Settings page, or the call fails.
-----
but actually it can call external site in JavaScript code using XmlHttpRequest in a custom button without Remote Site Settings.
Workaround
We haven't loaded the full details for this issue yet. Check the official page.
History
First tracked here as Closed with 2 reports
Nov 30, 2026