-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fa2942a
commit b07311e
Showing
3 changed files
with
8 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
import type { Csp } from '../../types' | ||
|
||
const REACT_APP_WALLET_MIGRATION_URL = process.env.REACT_APP_WALLET_MIGRATION_URL | ||
|
||
if (!REACT_APP_WALLET_MIGRATION_URL) throw new Error('REACT_APP_WALLET_MIGRATION_URL is required') | ||
|
||
export const csp: Csp = { | ||
'connect-src': [ | ||
// friendly-challenge@0.9.1: https://github.com/FriendlyCaptcha/friendly-challenge/blob/f110634f17f316b90a9bd59b190291abe3c639bb/src/captcha.ts#L20 | ||
'https://api.friendlycaptcha.com/api/v1/puzzle', | ||
process.env.REACT_APP_WALLET_MIGRATION_URL, | ||
REACT_APP_WALLET_MIGRATION_URL, | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
// process.env is not properly typed but could be if we were using vite imports.meta. wen vite? | ||
export type Csp = Record<string, (string | undefined)[]> | ||
export type CspEntry = (string | undefined)[] | ||
export type Csp = Record<string, string[]> | ||
export type CspEntry = string[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters