feat(uuid): implement UUID generation for non-secure contexts and replace crypto.randomUUID() usage
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { HttpClient, HttpErrorResponse, HttpHeaders } from '@angular/common/http';
|
||||
import { Injectable, inject } from '@angular/core';
|
||||
import { firstValueFrom, Observable } from 'rxjs';
|
||||
import { uuid } from '../../shared/utils/uuid';
|
||||
import { VOICE_STREAM_CONFIG, VoiceSessionStatus } from './voice-stream.types';
|
||||
|
||||
/**
|
||||
@@ -165,7 +166,7 @@ export class VoiceApiService {
|
||||
}
|
||||
|
||||
private readOptions() {
|
||||
return { withCredentials: true, headers: new HttpHeaders({ 'X-Request-ID': crypto.randomUUID() }) };
|
||||
return { withCredentials: true, headers: new HttpHeaders({ 'X-Request-ID': uuid() }) };
|
||||
}
|
||||
|
||||
private writeOptions(csrf: string) {
|
||||
@@ -173,7 +174,7 @@ export class VoiceApiService {
|
||||
withCredentials: true,
|
||||
headers: new HttpHeaders({
|
||||
'X-CSRF-Token': csrf,
|
||||
'X-Request-ID': crypto.randomUUID(),
|
||||
'X-Request-ID': uuid(),
|
||||
}),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user