Added Authorization headers in the RequestUtil.js

This commit is contained in:
Mathias Wagner 2024-02-15 17:11:48 +01:00
parent f6a8c3f537
commit aad8dd083b
Signed by: Mathias
GPG Key ID: B8DC354B0A1F5B44

View File

@ -10,7 +10,7 @@ const getHeaders = () => {
export const proxyRequest = async (path, method = "GET", body = {}, headers = {}) => { export const proxyRequest = async (path, method = "GET", body = {}, headers = {}) => {
return await fetch(PROXY_URL + "/" + path, { return await fetch(PROXY_URL + "/" + path, {
headers: {...headers}, method, headers: {...getHeaders(), ...headers}, method,
body: method !== "GET" ? new URLSearchParams(body) : undefined body: method !== "GET" ? new URLSearchParams(body) : undefined
}); });
} }