Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Minebomber committed Jan 4, 2024
1 parent e48f901 commit 1b88479
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 30 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN apk add --no-cache libc6-compat
# Install dependencies
WORKDIR /app
COPY package.json yarn.lock ./
COPY hypelab-react-0.5.1.tgz ./
COPY hypelab-react-0.5.2.tgz ./
RUN apk add git
RUN yarn --frozen-lockfile --ignore-optional

Expand Down
Binary file removed hypelab-react-0.5.1.tgz
Binary file not shown.
Binary file added hypelab-react-0.5.2.tgz
Binary file not shown.
59 changes: 31 additions & 28 deletions nextjs/csp/policies/ad.ts
Original file line number Diff line number Diff line change
@@ -1,55 +1,58 @@
import Base64 from 'crypto-js/enc-base64';
import sha256 from 'crypto-js/sha256';
import type CspDev from 'csp-dev';
import Base64 from "crypto-js/enc-base64";
import sha256 from "crypto-js/sha256";
import type CspDev from "csp-dev";

import { connectAdbutler, placeAd } from 'ui/shared/ad/adbutlerScript';
import { connectAdbutler, placeAd } from "ui/shared/ad/adbutlerScript";

export function ad(): CspDev.DirectiveDescriptor {
return {
'connect-src': [
"connect-src": [
// coinzilla
'coinzilla.com',
'*.coinzilla.com',
'https://request-global.czilladx.com',
"coinzilla.com",
"*.coinzilla.com",
"https://request-global.czilladx.com",

// slise
'*.slise.xyz',
"*.slise.xyz",

// hype
'api.hypelab-staging.com',
'api.hypelab.com',
'd1q98dzwj6s2rb.cloudfront.net',
'*.ixncdn.com',
'api.jxncdn.com',
"api.hypelab-staging.com",
"api.hypelab.com",
"d1q98dzwj6s2rb.cloudfront.net",
"*.ixncdn.com",
"api.jxncdn.com",
],
'frame-src': [
"frame-src": [
// coinzilla
'https://request-global.czilladx.com',
"https://request-global.czilladx.com",
],
'script-src': [
"script-src": [
// coinzilla
'coinzillatag.com',
"coinzillatag.com",

// adbutler
'servedbyadbutler.com',
`'sha256-${ Base64.stringify(sha256(connectAdbutler)) }'`,
`'sha256-${ Base64.stringify(sha256(placeAd ?? '')) }'`,
"servedbyadbutler.com",
`'sha256-${Base64.stringify(sha256(connectAdbutler))}'`,
`'sha256-${Base64.stringify(sha256(placeAd ?? ""))}'`,

// slise
'*.slise.xyz',
"*.slise.xyz",

'cdn.jsdelivr.net',
"cdn.jsdelivr.net",

// hype
"eval",
],
'img-src': [
"img-src": [
// coinzilla
'cdn.coinzilla.io',
"cdn.coinzilla.io",

// adbutler
'servedbyadbutler.com',
"servedbyadbutler.com",
],
'font-src': [
"font-src": [
// coinzilla
'https://request-global.czilladx.com',
"https://request-global.czilladx.com",
],
};
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"graphiql": "^2.2.0",
"graphql": "^16.8.1",
"graphql-ws": "^5.11.3",
"hypelab-react": "./hypelab-react-0.5.1.tgz",
"hypelab-react": "./hypelab-react-0.5.2.tgz",
"js-cookie": "^3.0.1",
"lodash": "^4.0.0",
"mixpanel-browser": "^2.47.0",
Expand Down

0 comments on commit 1b88479

Please sign in to comment.