Skip to content

Commit

Permalink
fix adbutler csp
Browse files Browse the repository at this point in the history
  • Loading branch information
isstuev committed Jun 20, 2023
1 parent d3155e4 commit 45ed806
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/csp/policies/ad.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import sha256 from 'crypto-js/sha256';
import type CspDev from 'csp-dev';

import isSelfHosted from 'lib/isSelfHosted';
import { connectAdbutler, placeAd } from 'ui/shared/ad/adbutlerScript';
import { connectAdbutler, placeAd, placeAdSPA } from 'ui/shared/ad/adbutlerScript';

export function ad(): CspDev.DirectiveDescriptor {
if (!isSelfHosted()) {
Expand All @@ -25,6 +25,7 @@ export function ad(): CspDev.DirectiveDescriptor {
'servedbyadbutler.com',
`'sha256-${ Base64.stringify(sha256(connectAdbutler)) }'`,
`'sha256-${ Base64.stringify(sha256(placeAd)) }'`,
`'sha256-${ Base64.stringify(sha256(placeAdSPA)) }'`,
'*.slise.xyz',
],
'img-src': [
Expand Down

0 comments on commit 45ed806

Please sign in to comment.