Added Authorization headers in the RequestUtil.js
This commit is contained in:
parent
f6a8c3f537
commit
aad8dd083b
@ -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
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user