mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-21 22:51:09 +02:00
* add dummy provider and wire it into the app * add tests for analytics service * add posthog provider * wire in posthog * add HVD limitation for analytics and add unit test * filter out sensitive event properties * add changelog * run copywrite headers * update logging tests for analytics service * update changelog format * disable telemetry in test mode * remove unnecessary test * self review * Update vault-reporting addon with analytics tracking changes * address review feedback --------- Co-authored-by: Jim Wright <jim.wright@hashicorp.com>
28 lines
621 B
JavaScript
28 lines
621 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
module.exports = function (environment) {
|
|
const policy = {
|
|
'default-src': ["'none'"],
|
|
'script-src': ["'self'"],
|
|
'font-src': ["'self'"],
|
|
'connect-src': ["'self'"],
|
|
'img-src': ["'self'", 'data:'],
|
|
'style-src': ["'unsafe-inline'", "'self'"],
|
|
'media-src': ["'self'"],
|
|
'form-action': ["'none'"],
|
|
};
|
|
|
|
policy['connect-src'].push('https://eu.i.posthog.com');
|
|
|
|
return {
|
|
delivery: ['header', 'meta'],
|
|
enabled: environment !== 'production',
|
|
failTests: true,
|
|
policy,
|
|
reportOnly: false,
|
|
};
|
|
};
|