Skip to main content

Content-Security-Policy

Introduction

Content Security Policy (CSP) adds a security layer that prevents certain types of attacks, like Cross-Site Scripting (XSS). Since Auvious Widget is hosted on your website, it is directly affected by this layer and if not configured correctly, it will not work properly.

The Content Security Policy is defined using the following syntax: <policy-directive>; <policy-directive>

Then there are commonly two ways to apply CSP in your web site:

  • Option 1: By configuring your web server to respond with HTTP Response Header 'Content-Security-Policy' e.g.
Content-Security-Policy: default-src 'self'; script-src 'self' https://example.com 'unsafe-inline'; style-src 'self' https://example.com
  • Option 2: Using a meta tag inside your html code e.g.
<html>
<head>
<title>CSP Example</title>
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' https://example.com 'unsafe-inline'; style-src 'self' https://example.com"/>
</head>
<body>
....
</body>
</html>

This guide's purpose is not to explain thorougly CSP, but to explain how it should be configured in order for Auvious Widget to work correctly. For more complete information,tutorials and specific details please consult the official MDN Documentation for CSP

Directives Used

Below are the directives that need to be configured in order for Auvious to work correctly

DirectiveDescription
script-srcspecifies valid sources for JavaScript
connect-srcrestricts urls that can be loaded from JavaScript
img-srcspecifies valid sources of images and favicons.
style-srcspecifies valid sources for stylesheets
child-srcspecifies valid sources for nested browsing contexts (iframes) and web workers
frame-srcspecifies valid sources for nested browsing contexts (iframes) (if absent, fallbacks to child-src)

Below are the directive values that Auvious Widget requires to be configured:

DirectiveValueDescription
script-srchttps://{auvious-url}Allows Auvious Javascript sources
connect-srchttps://{auvious-url} wss://{auvious-url} https://sentry.auvious.comAllows Auvious Api Access
style-srchttps://{auvious-url} 'unsafe-inline'Allows Auvious stylesheets
img-srchttps://{auvious-url}Allows Auvious image,icons etc...
frame-srchttps://{auvious-url}Allows Auvious video room iframes
child-srcblob:Used to allow sources for web workers

Replace {auvious-url} with the value from the table below according to the auvious region site you use. If you don't know which region you use, then it's probably the default one.

RegionValue
Europe West 1 (default)auvious.video
US Central 1us.auvious.video
Australia SouthEast 1au.auvious.video

Note that the above is just what Auvious requires. If you use Auvious through Genesys, Talkesk or Nice, then you should also consult with their most current documentation for additional directives and values. It's also a good practice to configure a report url so that you'll be able to detect any issues that your website users encounter.

If you're having problems you can always contact Auvious support by email, and we'll provide you with more details about your specific use case.