MCPcopy Create free account
hub / github.com/FlowiseAI/Flowise / getOAuth2AllowedDomains

Function getOAuth2AllowedDomains

packages/server/src/utils/oauth2Security.ts:20–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18 * @returns Array of lowercase domain strings that OAuth2 URLs are permitted to contact
19 */
20export function getOAuth2AllowedDomains(): string[] {
21 const securityCheckEnabled = process.env.OAUTH2_SECURITY_CHECK !== 'false'
22 const customDomains = getCustomDomains()
23 if (securityCheckEnabled) {
24 return [...new Set([...DEFAULT_ALLOWED_OAUTH2_DOMAINS, ...customDomains])]
25 }
26 return customDomains
27}
28
29/**
30 * Validates an OAuth2 URL against the allowed domain list.

Callers 2

validateOAuth2UrlFunction · 0.85

Calls 1

getCustomDomainsFunction · 0.85

Tested by

no test coverage detected