Http change or override Referer

Hi,

I’m trying to override the referef header in a Http call. As I see do somithing like.

    let headers = new Headers();
    headers.append('Content-Type', 'application/x-www-form-urlencoded');
    headers.append('Referer', 'www.exampple.com');
    headers.append( 'Authorization', 'Basic ' + _authdata );

is unsafe. In the network monitor attached to my android device I see

Referrer Policy:no-referrer-when-downgrade

How can I modify the policy to force to send the Referer?

Thanks and best regards

I think this is unrelated if I understood this correctly:
Referrer Policy

Hi, thanks for the answer, but

If it is not related, why can not I see the Referer in the Header on the network monitor? I don’t receive it in the server. Why can not set the referer at header? It’s and Ionic restriction? Angular restriction?

Thnaks and best regards

Hi,
its a browser restriction. You cant set the Referer header if you are making a browser request.
If you want to see who is sending the request you could use the ‘X-Requested-With’ header or use a custom header.

Any help on this related question please? :slight_smile: