How to set the Referrer-Policy HTTP header with the Angular HTTP Client?

4.5k views Asked by At

How can we set the Referrer-Policy HTTP header when using Angular's HTTP Client?

I've tried setting it below but it does not work:

let headers = new HttpHeaders();
headers = headers.set('Referrer-Policy', 'no-referrer');

this.httpClient.get(url, { headers: headers };

In the HTTP request information in the browser's Network tab:

Expected:

Referrer Policy: no-referrer

Actual:

Referrer Policy: origin-when-cross-origin
0

There are 0 answers