Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

175
Views
How to get referrer policy as strict-origin-when-cross-origin in node js

I have a node js application and I am getting the headers in the browser as below, when I am using the below code. ie when I redirect to an external URL.

Request URL: ####### Request Method: GET Status Code: 302 Remote Address: 45.60.49.112:443 Referrer Policy: no-referrer

module.exports = async (req, res) => {
    try {
        let url = "https://externalurl.com";
        res.header("Access-Control-Allow-Origin", "*");
            res.redirect(encodeURI(url));
        res.header("Access-Control-Allow-Origin", "*");
            res.redirect(encodeURI(url));
    } catch (err) {
        return res.status(500).json({ msg: err });
    }
}
    

Where as when I do a express route I am getting the below headers

Request URL: ####### Request Method: GET Status Code: 302 Found Remote Address: 10.246.196.20:443 Referrer Policy: strict-origin-when-cross-origin

Why is the Referrer-policy not coming as "strict-origin-when-cross-origin" when I do a .redirect. and how to add it?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!