I want to write Basic authorization in the response header and redirect it to the some url, so I do that
res.setHeader('Authorization', 'Basic a3p0ZXN0YXBpOkthMnFUdVZN')
res.setHeader('Location', result.data.registrationCreditUrl)
res.writeHead(302)
console.log(res)
res.end('end');
it sends it the url and it says 401 Unauthorized, but if I do get request to that url in the postman and set header manually to (Authorization - Basic a3p0ZXN0YXBpOwqeMnFUdVZN) it works fine