mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
Adds .hanzo/workflows/cicd.yml calling the canonical pipeline and drops the GitHub-hosted workflows it replaces. Lands here because this is where the repo is written — git.hanzo.ai is upstream and github.com is its push mirror, so the same change made on github.com never reaches the runner fleet.
32 lines
1.0 KiB
TypeScript
32 lines
1.0 KiB
TypeScript
import * as descriptors from './policies';
|
|
import { makePolicyString, mergeDescriptors } from './utils';
|
|
|
|
function generateCspPolicy(isPrivateMode = false) {
|
|
const policyDescriptor = mergeDescriptors(
|
|
descriptors.app(isPrivateMode),
|
|
// Exclude tracking/analytics sources in private mode
|
|
isPrivateMode ? {} : descriptors.ad(),
|
|
isPrivateMode ? {} : descriptors.blockchainInteraction(),
|
|
descriptors.cloudFlare(),
|
|
descriptors.flashblocks(),
|
|
descriptors.googleFonts(),
|
|
descriptors.googleReCaptcha(),
|
|
isPrivateMode ? {} : descriptors.hanzoInsights(),
|
|
descriptors.helia(),
|
|
isPrivateMode ? {} : descriptors.marketplace(),
|
|
descriptors.megaEth(),
|
|
isPrivateMode ? {} : descriptors.mixpanel(),
|
|
descriptors.monaco(),
|
|
descriptors.multichain(),
|
|
isPrivateMode ? {} : descriptors.rollbar(),
|
|
descriptors.rollup(),
|
|
descriptors.safe(),
|
|
descriptors.usernameApi(),
|
|
descriptors.zetachain(),
|
|
);
|
|
|
|
return makePolicyString(policyDescriptor);
|
|
}
|
|
|
|
export default generateCspPolicy;
|