node-http-mitm-proxy
node-http-mitm-proxy copied to clipboard
Other response types (302)
Is it possible to send a 302 REDIRECT response instead of any other [body] content? I don't think I directly have a refrence to the response object, so I can't write a header. I'm currently using a meta-refresh tag, but that just seams wrong.
For example with the built in http server I could do something like this the send a redirect
const server = http.createServer( ( req, res ) => { res.writeHead( 302, { 'Location': 'https://wwwgoogle.com/' } ); res.end(); } );