mirror of
https://github.com/ItzCrazyKns/Perplexica.git
synced 2025-06-18 15:58:31 +00:00
Websocket auth, pass access token in gke configs
This commit is contained in:
@ -24,14 +24,14 @@ export const formatTimeDifference = (date1: Date, date2: Date): string => {
|
||||
export const clientFetch = async (path: string, payload: any): Promise<any> => {
|
||||
let headers = payload.headers;
|
||||
const url = `${getBackendURL()}${path}`;
|
||||
const secret_token = getAccessKey();
|
||||
const secretToken = getAccessKey();
|
||||
|
||||
if (secret_token) {
|
||||
if (secretToken) {
|
||||
if (headers == null) {
|
||||
headers = {};
|
||||
};
|
||||
|
||||
headers['Authorization'] = `Bearer ${secret_token}`;
|
||||
headers['Authorization'] = `Bearer ${secretToken}`;
|
||||
payload.headers = headers;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user