Skip to content

Commit caec2b4

Browse files
author
abhinav
committed
change clientSideRenderer
1 parent ded497a commit caec2b4

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

server.ts

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -316,20 +316,7 @@ function serverSideRender(req, res, next, sendToUser: boolean = true) {
316316
const indexHtmlContent = readFileSync(indexHtml, 'utf8');
317317

318318
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-
332-
res.send(indexHtml, {
319+
res.send(indexHtmlContent, {
333320
headers: {
334321
'Cache-Control': 'no-cache, no-store',
335322
},

0 commit comments

Comments
 (0)