Skip to content

Commit 4a0c609

Browse files
author
abhinav
committed
change clientSideRenderer
1 parent ded497a commit 4a0c609

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

server.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -312,23 +312,7 @@ function serverSideRender(req, res, next, sendToUser: boolean = true) {
312312
});
313313
}
314314

315-
// Read file once at startup
316-
const indexHtmlContent = readFileSync(indexHtml, 'utf8');
317-
318315
function clientSideRender(req, res) {
319-
const namespace = environment.ui.nameSpace || '/';
320-
let html = indexHtmlContent;
321-
// Replace base href dynamically
322-
html = html.replace(
323-
/<base href="[^"]*">/,
324-
`<base href="${namespace.endsWith('/') ? namespace : namespace + '/'}">`
325-
);
326-
327-
// Replace REST URL with UI URL
328-
if (environment.ssr.replaceRestUrl && REST_BASE_URL !== environment.rest.baseUrl) {
329-
html = html.replace(new RegExp(REST_BASE_URL, 'g'), environment.rest.baseUrl);
330-
}
331-
332316
res.send(indexHtml, {
333317
headers: {
334318
'Cache-Control': 'no-cache, no-store',

0 commit comments

Comments
 (0)