Skip to content

Commit 63028c6

Browse files
authored
fix: disable usercentrics in staging (supabase#37347)
1 parent dbb413b commit 63028c6

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

packages/common/consent-state.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,13 @@ export const consentState = proxy({
6161
async function initUserCentrics() {
6262
if (process.env.NODE_ENV === 'test' || !IS_PLATFORM) return
6363

64-
// [Alaister] For local development, we accept all consent by default.
65-
// If you need to test usercentrics locally, comment out the
64+
// [Alaister] For local development and staging, we accept all consent by default.
65+
// If you need to test usercentrics in these environments, comment out this
6666
// NEXT_PUBLIC_ENVIRONMENT check and add an ngrok domain to usercentrics
67-
if (process.env.NEXT_PUBLIC_ENVIRONMENT === 'local') {
67+
if (
68+
process.env.NEXT_PUBLIC_ENVIRONMENT === 'local' ||
69+
process.env.NEXT_PUBLIC_ENVIRONMENT === 'staging'
70+
) {
6871
consentState.hasConsented = true
6972
return
7073
}

0 commit comments

Comments
 (0)