1
0
mirror of synced 2025-12-23 11:54:18 -05:00

Support Portal & Docs Collaboration: Virtual Assistant in Docs (#35772)

Co-authored-by: Peter Bengtsson <peterbe@github.com>
Co-authored-by: Peter Bengtsson <mail@peterbe.com>
This commit is contained in:
Zen van Riel
2023-03-29 14:38:47 +02:00
committed by GitHub
parent b79a19abf3
commit e66e2ab5ac
7 changed files with 187 additions and 0 deletions

View File

@@ -38,6 +38,11 @@ const DEFAULT_OPTIONS = {
frameSrc: [
...GITHUB_DOMAINS,
isDev && 'http://localhost:3000',
// This URL is also set in ArticleContext.tsx. We don't rely on importing a constant as we may run into an import conflict where the env variable is not yet set.
process.env.NODE_ENV === 'production'
? 'https://support.github.com'
: // Assume that a developer is not testing the VA iframe locally if this env var is not set
process.env.SUPPORT_PORTAL_URL || '',
'https://www.youtube-nocookie.com',
].filter(Boolean),
frameAncestors: isDev ? ['*'] : [...GITHUB_DOMAINS],