I've found the issue. The problem was coming from the varnish's configuration, which was playing the set-cookie value.