We are configuring multiple site within single Next.js application. In experience editor the multisite work perfectly because its passing sc_site parameter as a query string. But in normal mode only default site work, the other site did not work if we browse different hostname other than default site.
So in Next.js for normal mode how we pass additional sc_site parameter with site name value?
In Next.js there is one class "SitecorePagePropsFactory" and its constructor initializing parameter for layout service. So can we make any change here to pass sc_site parameter to configure multisite or is there any another way?
this.dictionaryService = new RestDictionaryService({
apiHost: config.sitecoreApiHost,
apiKey: config.sitecoreApiKey,
siteName: config.jssAppName,
});
this.layoutService = new RestLayoutService({
apiHost: config.sitecoreApiHost,
apiKey: config.sitecoreApiKey,
siteName: config.jssAppName,
});