F
F
fairjanir2016-06-09 10:11:09
Node.js
fairjanir, 2016-06-09 10:11:09

How to redirect without passing referer in express?

I make a redirect from the browser from the page: site.com/test
window.location.href = ' site.com/redirect?url=http://site2.net ';

app.get('/redirect', function( req, res ) {
  if( req.query.url )
    res.redirect( 301, req.query.url );
  else
    res.send( 'error' );
});

I want to get rid of the referrer by making a redirect from the browser first to the server, and the server would have redirected it to the right place without it.
But in this scenario, the referer is still passed.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Wolf, 2016-06-09
@fairjanir

If you are redirecting a user to a site in http, then configure your https, then the referer will not be transmitted =)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question