Integration of matomo with env vars

This commit is contained in:
guillaume 2018-07-27 18:08:09 +02:00
parent aa080a7506
commit ec59af3777
5 changed files with 92 additions and 1 deletions

9
server/policy.js Normal file
View file

@ -0,0 +1,9 @@
import { BrowserPolicy } from 'meteor/browser-policy-common';
Meteor.startup(() => {
const matomoUrl = process.env.MATOMO_ADDRESS;
if (matomoUrl){
BrowserPolicy.content.allowScriptOrigin(matomoUrl);
BrowserPolicy.content.allowImageOrigin(matomoUrl);
}
});