-
Notifications
You must be signed in to change notification settings - Fork 24
/
whiteListEnv.js
94 lines (93 loc) · 2.82 KB
/
whiteListEnv.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
export const whiteListEnv = (env, commitHash) => {
const authorizedEnvVars = [
'ACCESSIBILITY_LINK',
'ALGOLIA_APPLICATION_ID',
'ALGOLIA_OFFERS_INDEX_NAME_B',
'ALGOLIA_OFFERS_INDEX_NAME',
'ALGOLIA_SEARCH_API_PUBLIC_KEY',
'ALGOLIA_SUGGESTIONS_INDEX_NAME',
'ALGOLIA_TOP_OFFERS_INDEX_NAME',
'ALGOLIA_VENUES_INDEX_NAME',
'ALGOLIA_VENUES_INDEX_PLAYLIST_SEARCH_NEWEST',
'ALGOLIA_VENUES_INDEX_PLAYLIST_SEARCH',
'AMPLITUDE_API_PUBLIC_KEY',
'ANDROID_APP_ID',
'ANDROID_APP_NAME',
'API_BASE_URL',
'APP_DISPLAY_NAME',
'APP_PUBLIC_URL',
'APPLE_STORE_URL',
'APPS_FLYER_DEV_PUBLIC_KEY',
'APPS_FLYER_WEB_PUBLIC_KEY',
'BATCH_API_PUBLIC_KEY_ANDROID',
'BATCH_API_PUBLIC_KEY_IOS',
'BOOKING_FEEDBACK_LINK',
'BOOKING_LIMIT_EXCEEDED_URL',
'CGU_LINK',
'CODEPUSH_DEPLOYMENT_NAME',
'CODEPUSH_PUBLIC_KEY_ANDROID',
'CODEPUSH_PUBLIC_KEY_IOS',
'CONTENTFUL_ENVIRONMENT',
'CONTENTFUL_PUBLIC_ACCESS_TOKEN',
'CONTENTFUL_SPACE_ID',
'COOKIES_POLICY_LINK',
'CULTURAL_SURVEY_TYPEFORM_ID',
'DATA_PRIVACY_CHART_LINK',
'DMS_FOREIGN_CITIZEN_URL',
'DMS_FRENCH_CITIZEN_URL',
'DOC_CGU_URL',
'DOC_PERSONAL_DATA_URL',
'EDUCONNECT_ALLOWED_DOMAIN',
'ENV',
'FAQ_LINK_CREDIT',
'FAQ_LINK_DELETE_ACCOUNT',
'FAQ_LINK_EDUCONNECT_URL',
'FAQ_LINK_PERSONAL_DATA',
'FAQ_LINK_RESET_PASSORD_EMAIL_NOT_RECEIVED',
'FAQ_LINK_RIGHT_TO_ERASURE',
'FAQ_LINK_SIGNUP_CONFIRMATION_EMAIL_NOT_RECEIVED',
'FAQ_LINK',
'FEATURE_FLIPPING_ONLY_VISIBLE_ON_TESTING',
'FIREBASE_API_PUBLIC_KEY',
'FIREBASE_APPID',
'FIREBASE_AUTHDOMAIN',
'FIREBASE_DYNAMIC_LINK_DOMAIN',
'FIREBASE_MESSAGINGSENDERID',
'FIREBASE_PROJECTID',
'FIREBASE_STORAGEBUCKET',
'FRAUD_EMAIL_ADDRESS',
'GCP_IMAGE_COULD_STORAGE_NAME',
'GOOGLE_CLIENT_ID',
'GOOGLE_IOS_CLIENT_ID',
'GOOGLE_IOS_REVERSED_CLIENT_ID',
'GOOGLE_MAPS_API_PUBLIC_KEY',
'GOOGLE_PLAY_STORE_URL',
'IOS_APP_ICON',
'IOS_APP_ID',
'IOS_APP_NAME',
'IOS_APP_STORE_ID',
'IOS_PROVISIONING_PROFILE_SPECIFIER_DEVELOPMENT',
'IOS_PROVISIONING_PROFILE_SPECIFIER_RELEASE',
'IOS_TEAM_ID',
'PASSCULTURE_DOWNLOAD_APP_URL',
'PRIVACY_POLICY_LINK',
'RESIZE_IMAGE_ON_DEMAND_URL',
'SENTRY_DSN',
'SENTRY_PROFILES_SAMPLE_RATE',
'SENTRY_TRACES_SAMPLE_RATE',
'SENTRY_SAMPLE_RATE',
'SITE_PUBLIC_KEY',
'SUPPORT_EMAIL_ADDRESS',
'URL_PREFIX',
'WEBAPP_V2_DOMAIN',
]
return {
...authorizedEnvVars.reduce((acc, key) => {
if (env[key] !== undefined) {
acc[key] = env[key]
}
return acc
}, {}),
COMMIT_HASH: commitHash, // Variables passed in our vite's config define (ex: 'process.env.COMMIT_HASH': JSON.stringify(commitHash)) are undefined for some reason in builds (in serve they were defined).
}
}