I have a node js server, and after post request to the server, I insert some data into the database, after that, I want to redirect my client into the other external web-page("google.com" for example) but I want to redirect with Basic auth header, How can I do that?
I have tried to set the header manually, but it does not work
const auth = "Basic " + new Buffer.from("test" + ":" + "testPassword").toString("base64");
res.setHeader('Authorization', auth);
and after db insertion I do this
enter code here return res.redirect(result.data.registrationCreditUrl);