mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-06 17:44:11 +00:00
SSR: avoid sending new response when headeras were already sent (fixes #2315)
This commit is contained in:
@@ -268,6 +268,12 @@ function serverSideRender(req, res, next, sendToUser: boolean = true) {
|
||||
],
|
||||
})
|
||||
.then((html) => {
|
||||
// If headers were already sent, then do nothing else, it is probably a
|
||||
// redirect response
|
||||
if (res.headersSent) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (hasValue(html)) {
|
||||
// Replace REST URL with UI URL
|
||||
if (environment.ssr.replaceRestUrl && REST_BASE_URL !== environment.rest.baseUrl) {
|
||||
|
Reference in New Issue
Block a user