# Enable communication with Mosaic APIs

For successful integration, make sure your environment doesn't disrupt the communication with Mosaic's resources:

- Allow URLs and IP addresses
- Update the Content Security Policy (if it's already deployed)


## Allow URLs and IP addresses

Before deploying the application to production, configure your firewall or other networking devices to allow Mosaic's domains and IP addresses.

Using a custom domain?
If you're using a [custom domain](/guides/deployment/custom_domains) for your Mosaic application, configure your firewall to allow your custom domain instead of the default Transmit domain listed below.

Allow the following domain:

* `*.transmitsecurity.io`


Also, contact your account manager for a list of production IP addresses and allow them all on your network.

## Configure the Content Security Policy

[Content Security Policy (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) helps prevent and mitigate certain type of attacks (XSS, injections...) through input sanitation and other measures.

If you have a deployed CSP in your application, you'll need to authorize the scripts and apply the policy to connections from AJAX and WebSocket.

To authorize the scripts and the connections, add the following directives to the `Content-Security-Policy` header. In `connect-src`, add the API host for the region where your tenant resides (see [Understand environments, regions, and tenants](/guides/deployment/understand_environments_regions_tenants)):

```
script-src: <existing-content> https://platform-websdk.transmitsecurity.io/platform-websdk/2.x/ts-platform-websdk.js
connect-src: <existing-content> https://<BASE_URL>
```

Note
The examples below use the US production host, `https://api.transmitsecurity.io`. That host covers Mosaic API calls for the region, including Fraud Prevention data collection (`https://api.transmitsecurity.io/risk-collect/`).

If your tenant uses another region, add that region's API host instead of the US host. For example, a tenant in the EU production region uses `https://api.eu.transmitsecurity.io`.

If you are using a [custom domain](/guides/deployment/custom_domains), update your CSP `connect-src` directive to include your custom domain instead of (or in addition to) the Transmit hosts.

```
script-src: <existing-content> https://platform-websdk.transmitsecurity.io/platform-websdk/2.x/ts-platform-websdk.js
connect-src: <existing-content> https://api.transmitsecurity.io
```

Example implementation for Node.js:

```js
var http = require('http');
http.createServer(function (req, res) {
  // API host for your region. This example uses US production.
  res.setHeader(
    "Content-Security-Policy",
    "script-src 'self' 'https://platform-websdk.transmitsecurity.io/platform-websdk/2.x/ts-platform-websdk.js'; connect-src 'self' 'https://api.transmitsecurity.io'"
  );
  // Do the rest: serve the content...
}).listen(1234);
```

For additional information, see [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) (MDN) and the documentation for your programming language or framework.