Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

147
Visualizações
It is possible to get more params than the route specified?

I´m struggling with this because I´m using a CAS authentication in my work.

When login is successful you're redirected to the previous URL but the problem is that is not redirecting to the previous URL is redirected to the base URL+ first param here is an example of how is all of this "working":

So the express route is something like this:

    if (req.isAuthenticated()) {
        //console.log("valor token: ", req.session.token);
        next(); // permitir la siguiente ruta
    } else {
        // requerir al usuario log in cuando no es desarrollo
        if (environment === 'development' ) {//|| environment === 'staging') {
            //res.redirect("/cstools" + "?path=" + req.path);
            next();
        } else {
            //console.log(req, req.url);
            res
            .cookie("redirect", "1", { httpOnly:false, path: "/cstools", secure: false })
            .redirect("/cstools" + "?path=" + req.path);
        }
    }
});

Here it is the url I´m using:

/cstools/private/soporteOnLine/#/app/inicio/sugerencia/modal

but when is called in the browser the backend only gets the first param after private

/cstools/private/soporteOnLine

My first approach was to create a cookie for telling the browser to redirect to the previous URLbut as I am only getting one parameter so I cannot redirect to the URL that I want

My question here is how can I get the full URL for redirect when login is successful

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda