# Script Tags Transformed to Fetch Calls

Lightning Web Security (LWS) transforms `<script>` tags into `fetch` calls. LWS downloads the script to evaluate it in the sandbox.

To enable the `fetch` calls to succeed:

- Configure the `connected-src` CSP directive on the Salesforce site where the component runs to allow access to the script resource server. See [Manage Trusted URLs](https://help.salesforce.com/s/articleView?id=sf.security_trusted_urls_manage.htm).

- Configure the resource server with cross-origin resource sharing [(CORS)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) to add the origin of the Salesforce site to its allowed origins list. The component can then access server resources.
