LPS-43106 Referer is not trustable enough because it can become null in some browser or under specific configuration. In that case we fallback in the previous mechanism.