I solved this problem by adding proxying of the host header in the nginx configuration, like this:
server { listen 80; server_name localhost:3000; location / { proxy_pass http://myservice:8080/; proxy_set_header HOST $host; proxy_set_header Referer $http_referer; }}
I added that:
proxy_set_header HOST $host;
proxy_set_header Referer $http_referer;