I have the following setup in express server
app.get("/oauth2", (req, res) => {
console.log("PLEASE WORK");
res.redirect(301, "https://google.com/");
});
On the first request to the server it works fine, meaning "PLEASE WORK" will be logged and redirect works as normal and goes to google, but if I request the server again at oauth2, "PLEASE HELP" is not logged but it still redirects to google, if I change the url to "facebook.com", it still redirects to google. And if I completely remove the code, and save the file, it still redirects to google even though the code doesn't exist. Does the browser cache it? I've tried restarting the server, restarting the browser, I don't get it. I've tried using a http server as well
res.writeHead(308, {Location:"https://facebook.com/"});
res.end();
Exact same thing happens.