Request Error: 'Referrer Policy: strict-origin-when-cross-origin' in Angular when build in --prod mode

36.6k views Asked by At

I deployed my Angular application to https domain. And the API domain is http.

When I build my Angular app using --prod I got an error in requests that Referrer Policy: strict-origin-when-cross-origin, However when I build without --prod the requests are working perfectly.

Any ideas?

1

There are 1 answers

1
vinyll On

If you're asking it means you're probably using a Chromium-based browser such as Brave, Chrome or others.

When connecting to an API, the request should pass a privacy policy. Chromium-based browser have recently changed the default policy.

You may want to have a look at the official reference about the Strict Origin when Cross Origin as this could eventually evolve again.

Note that when a Chromium-based browser is giving you some error, also trying with Firefox may give you an extra error message and help you understand what is blocking.