You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prior to PR #4708 you could access redirect headers with beforeRedirect: (options, { headers }) but with the changes in #4708 the headers are no longer available. To me it's unclear whether this was an intentional change or not but the documentation suggests that this should still be working.
varaxios=require("axios")// Works with an older version// var axios = require("axios@0.27.2")varexpress=require("express")varapp=express()app.get('/redirect',(req,res)=>{res.cookie("Hello","World");res.redirect("/");})app.get('/',(req,res)=>{res.send('Hello World!')})app.listen(3000,()=>{axios.get("http://localhost:3000/redirect",{// Headers undefinedbeforeRedirect: (options,{ headers })=>{console.log({options, headers});}});});
The text was updated successfully, but these errors were encountered:
Describe the bug
Prior to PR #4708 you could access redirect headers with
beforeRedirect: (options, { headers })
but with the changes in #4708 theheaders
are no longer available. To me it's unclear whether this was an intentional change or not but the documentation suggests that this should still be working.To Reproduce
https://npm.runkit.com/axios
The text was updated successfully, but these errors were encountered: