Skip to content

Commit

Permalink
add cors settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Sepideh Alassi committed Jan 31, 2024
1 parent e669739 commit 6bf20a5
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/app/services/beol.service.ts
Expand Up @@ -848,17 +848,16 @@ export class BeolService {

requestGraphDB(query: string): Observable<DataGraphDB> {
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<DataGraphDB>(url, body, httpOptions);
return this._http.post<DataGraphDB>(url, body, {'headers': headers, withCredentials: true});
}

/**
Expand Down

0 comments on commit 6bf20a5

Please sign in to comment.