Solved with @Zacharias answer.
For me the problem was at webserver level. I had the Referrer-Policy header set to strict-origin. By definition that header value makes the webserver to use only the origin and only if HTTPS. Changing that header to 'same-origin' solved the problem in dev environment (because i was on HTTP)