From 6bf20a5e75b52184b73cad3bfbfa3f0625986b1a Mon Sep 17 00:00:00 2001 From: Sepideh Alassi <> Date: Wed, 31 Jan 2024 17:13:21 +0100 Subject: [PATCH] add cors settings --- src/app/services/beol.service.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/app/services/beol.service.ts b/src/app/services/beol.service.ts index 70b35735..57b191a8 100644 --- a/src/app/services/beol.service.ts +++ b/src/app/services/beol.service.ts @@ -848,17 +848,16 @@ export class BeolService { requestGraphDB(query: string): Observable { const url = this._appInitService.config['graphDBUrl'] - const httpOptions = { - headers: new HttpHeaders({ + const headers = { "Content-Type": "application/x-www-form-urlencoded", "Accept": "application/json", 'Authorization': ('Basic ' + btoa('anonymous:test')) - }) - } + } + const body = new HttpParams() .set('query', query) - return this._http.post(url, body, httpOptions); + return this._http.post(url, body, {'headers': headers, withCredentials: true}); } /**