Friday, 19 March 2021

Redirect to new tab with masking url nodeJS

Im doing nodeJS backend, when front-end call my API, i want to redirect users to new tab, masking url of redirect with my own url, explaining my problem:

It's two step problem, i can solve it one by one but not both together.

For redirect masking url i can:

if(url){
request(url).pipe(res);
}

For redirect opening url on new tab:

open(url, function (err) {
    if ( err ) throw err;    
});

I tried it but doesnt work

open(request(url).pipe(res), function (err) {
        if ( err ) throw err;    
    });

anyone know how to do it?

What i need?

Redirect user to new tab, where him will see url content, but masking url with my url

I need this for downloading too



from Redirect to new tab with masking url nodeJS

No comments:

Post a Comment