Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Below you will find the domain Mopinion uses and an example of how this should be defined in Nginx.

typeType

domainsDomains

extraExtra*

script-src

https://*.mopinion.com

'unsafe-eval' 'unsafe-inline'

style-src

https://*.mopinion.com https://fonts.googleapis.com

frame-src

https://*.mopinion.com

connect-src

http://*.mopinion.com

img-src

https://*.mopinion.com

font-src

'self' data: https://*.mopinion.com https://fonts.gstatic.com

The 'unsafe-inline' setting is only needed when the script is loaded inline in the HTML of the page. When using a tag manager or loading the script from a file ‘unsafe-inline’ can be removed from the CSP.

Example in Nginx:

Code Block
add_header Content-Security-Policy "script-src 'self' 'unsafe-eval' 'unsafe-inline' https://*.mopinion.com; style-src 'self' https://*.mopinion.com https://fonts.googleapis.com; frame-src https://*.mopinion.com; connect-src https://*.mopinion.com; font-src 'self' data: https://*.mopinion.com https://fonts.gstatic.com;";

CORS header

Code Block
<IfModule mod_headers.c>
<FilesMatch "\.(ttf|ttc|otf|eot|woff| woff2|font.css|css|js)$">
Header set Access-Control-Allow-Origin "*.mopinion.com"
</FilesMatch>

...