Static assets scraping

In the context of Zoning and Session Replay, Contentsquare fetches static assets on your website.

To allow Contentsquare fetching these assets, select one of the following options:

Allow ports 80 (HTTP) and 443 (HTTPS) and the following IP addresses to prevent your proxy, firewall, or server configuration from blocking the scraper.

52.18.162.157
20.75.90.236
100.24.76.90
34.192.98.148
20.67.250.109
54.247.44.196
52.51.9.12
35.72.153.38
35.73.99.41
34.192.240.128

When selecting this option, Contentsquare adds a custom header to the project settings.

{
"headers": {
"my-new-header-key": "myKeyValue"
}
}

You can then validate that scraper requests contain the specific header and value.

receivedHeaderExample = 'myKeyValue';
const CONTENTSQUARE_CUSTOM_HEADER = 'myKeyValue';
if (receivedHeaderExample === CONTENTSQUARE_CUSTOM_HEADER) {
//
}