Use the Referer header when present and Origin is not available