growthBook.ts 270 Bytes
Newer Older
贾浩@五瓣科技's avatar
贾浩@五瓣科技 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
import type CspDev from 'csp-dev';

import config from 'configs/app';

export function growthBook(): CspDev.DirectiveDescriptor {
  if (!config.features.growthBook.isEnabled) {
    return {};
  }

  return {
    'connect-src': [
      'cdn.growthbook.io',
    ],
  };
}