Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

185
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda