From cdc3be8839eee9fabf0ca0cb60be0fa2fb778728 Mon Sep 17 00:00:00 2001 From: Thuan Vo Date: Wed, 10 Jul 2024 11:41:01 -0700 Subject: [PATCH] fix: correct report URL construct --- src/app/Shared/Services/Report.service.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/app/Shared/Services/Report.service.tsx b/src/app/Shared/Services/Report.service.tsx index c0ebcddb4..a0a61ea4d 100644 --- a/src/app/Shared/Services/Report.service.tsx +++ b/src/app/Shared/Services/Report.service.tsx @@ -34,11 +34,9 @@ export class ReportService { } const headers = new Headers(); headers.append('Accept', 'application/json'); - let url = recording.reportUrl; - if (!url.startsWith(this.login.authority)) { - url = `${this.login.authority}/${recording.reportUrl}`; - } - return fromFetch(url, { + let url = new URL(recording.reportUrl, document.location.href); + + return fromFetch(url.toString(), { method: 'GET', mode: 'cors', credentials: 'include',