From ecb73949a134baa552f9c0e3a01108ce10e5af47 Mon Sep 17 00:00:00 2001 From: Andrew Azores Date: Thu, 9 May 2024 11:37:44 -0400 Subject: [PATCH] fix(reports): ensure reports generation URLs are prefixed by the server authority --- src/app/Shared/Services/Report.service.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/Shared/Services/Report.service.tsx b/src/app/Shared/Services/Report.service.tsx index 7f6dfc9f7..873fcbab2 100644 --- a/src/app/Shared/Services/Report.service.tsx +++ b/src/app/Shared/Services/Report.service.tsx @@ -34,7 +34,11 @@ export class ReportService { } const headers = new Headers(); headers.append('Accept', 'application/json'); - return fromFetch(recording.reportUrl, { + let url = recording.reportUrl; + if (!url.startsWith(this.login.authority)) { + url = `${this.login.authority}/${recording.reportUrl}`; + } + return fromFetch(url, { method: 'GET', mode: 'cors', credentials: 'include',