mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
[DURACOM-288] Refactoring configuration to transfer state
This commit is contained in:
@@ -270,10 +270,8 @@ function serverSideRender(req, res, next, sendToUser: boolean = true) {
|
||||
.then((html) => {
|
||||
if (hasValue(html)) {
|
||||
// Replace REST URL with UI URL
|
||||
if (environment.ui.replaceRestUrl && REST_BASE_URL !== environment.rest.baseUrl) {
|
||||
const t0 = Date.now();
|
||||
if (environment.ssr.replaceRestUrl && REST_BASE_URL !== environment.rest.baseUrl) {
|
||||
html = html.replace(new RegExp(REST_BASE_URL, 'g'), environment.rest.baseUrl);
|
||||
console.log(`Replaced all SSR URLs in HTML in ${Date.now() - t0}ms`); // todo: remove this
|
||||
}
|
||||
|
||||
// save server side rendered page to cache (if any are enabled)
|
||||
|
Reference in New Issue
Block a user