Fix 'Referer' header in document request