-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PROD-1125 1118 config overrides query cookie window (#4297)
- Loading branch information
1 parent
7b15ac1
commit 8471288
Showing
12 changed files
with
510 additions
and
40 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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { FidesOptionOverrides, OverrideOptions } from "./consent-types"; | ||
|
||
// Regex to validate a location string, which must: | ||
// 1) Start with a 2-3 character country code (e.g. "US") | ||
// 2) Optionally end with a 2-3 character region code (e.g. "CA") | ||
// 3) Separated by a dash (e.g. "US-CA") | ||
export const VALID_ISO_3166_LOCATION_REGEX = /^\w{2,3}(-\w{2,3})?$/; | ||
|
||
export const FIDES_OVERRIDE_OPTIONS_VALIDATOR_MAP: { | ||
fidesOption: keyof FidesOptionOverrides; | ||
fidesOptionType: "string" | "boolean"; | ||
fidesOverrideKey: keyof OverrideOptions; | ||
validationRegex: RegExp; | ||
}[] = [ | ||
{ | ||
fidesOption: "fidesEmbed", | ||
fidesOptionType: "boolean", | ||
fidesOverrideKey: "fides_embed", | ||
validationRegex: /^(true|false)$/, | ||
}, | ||
{ | ||
fidesOption: "fidesDisableSaveApi", | ||
fidesOptionType: "boolean", | ||
fidesOverrideKey: "fides_disable_save_api", | ||
validationRegex: /^(true|false)$/, | ||
}, | ||
{ | ||
fidesOption: "fidesString", | ||
fidesOptionType: "string", | ||
fidesOverrideKey: "fides_string", | ||
validationRegex: /(.*)/, | ||
}, | ||
]; |
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
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
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
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
Oops, something went wrong.