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

140
Views
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
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!