File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
packages/contentstack-bootstrap/src/bootstrap Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -190,12 +190,17 @@ 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+ }
197+
193198
194199 // Construct image hostname based on the actual host being used
195200 let imageHostname = '*-images.contentstack.com' ; // default fallback
196201 if ( region ?. cda ) {
197202 const baseHost = region . cda . replace ( / ^ h t t p s ? : \/ \/ / , '' ) . replace ( / ^ [ ^ . ] + \. / , '' ) ;
198- imageHostname = `*- images.${ baseHost } ` ;
203+ imageHostname = `images.${ baseHost } ` ;
199204 }
200205 const production = environmentVariables . environment === 'production' ? true : false ;
201206 switch ( appConfigKey ) {
@@ -212,7 +217,7 @@ const envFileHandler = async (
212217 } \nNEXT_PUBLIC_CONTENTSTACK_ENVIRONMENT=${ environmentVariables . environment
213218 } \nNEXT_PUBLIC_CONTENTSTACK_REGION=${ regionName
214219 } \nNEXT_PUBLIC_CONTENTSTACK_PREVIEW=${ livePreviewEnabled ? 'true' : 'false'
215- } \nNEXT_PUBLIC_CONTENTSTACK_CONTENT_DELIVERY = ${ cdnHost
220+ } \nNEXT_PUBLIC_CONTENTSTACK_CONTENT_DELIVERY = ${ graphqlHost
216221 } \nNEXT_PUBLIC_CONTENTSTACK_CONTENT_APPLICATION = ${ appHost
217222 } \nNEXT_PUBLIC_CONTENTSTACK_PREVIEW_HOST = ${ previewHost
218223 } \nNEXT_PUBLIC_CONTENTSTACK_IMAGE_HOSTNAME=${ imageHostname } `;
You can’t perform that action at this time.
0 commit comments