File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
packages/contentstack-bootstrap/src/bootstrap Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -190,10 +190,14 @@ const envFileHandler = async (
190190 if ( regionName !== 'eu' && ! isUSRegion ) {
191191 customHost = region ?. cma ?. substring ( 8 ) ;
192192 }
193- let graphqlHost = "graphql.contentstack.com" ;
194- if ( regionName != 'na' ) {
195- graphqlHost = `${ regionName } -.graphql.contentstack.com` ;
196- }
193+ const getGraphqlHost = ( name ?: string ) : string => {
194+ const r = name ?. toLowerCase ( ) ;
195+ if ( ! r || r === 'na' || r === 'aws-na' ) {
196+ return 'graphql.contentstack.com' ;
197+ }
198+ return `${ r } -graphql.contentstack.com` ;
199+ } ;
200+ const graphqlHost = getGraphqlHost ( regionName ) ;
197201
198202
199203 // Construct image hostname based on the actual host being used
You can’t perform that action at this time.
0 commit comments