test and fix redirect tracking

This commit is contained in:
James
2020-02-22 10:06:18 +00:00
parent d81dc86381
commit 9a84ec204d
3 changed files with 121 additions and 31 deletions

View File

@@ -23,7 +23,7 @@ app.get('/link4', function (request, response) {
});
app.get('/redirectToNotFound', function (request, response) {
response.redirect('/notExists');
response.redirect('/notFound2');
});
app.get('/redirectToFound', function (request, response) {
@@ -54,6 +54,18 @@ app.get('/internalServerError', function (request, response) {
response.status(500).end();
});
app.get('/page1', function (request, response) {
response.end('<a href="/page1">Page1</a><a href="/page2">Page2</a><a href="/page3">Page3</a><a href="/notFound1">NotFound</a><a href="/redirectToRedirectToNotFound">redirectToRedirectToNotFound</a>');
});
app.get('/page2', function (request, response) {
response.end('<a href="/page1">Page1</a><a href="/page2">Page2</a><a href="/page3">Page3</a><a href="/notFound1">NotFound</a><a href="/redirectToRedirectToNotFound">redirectToRedirectToNotFound</a>');
});
app.get('/page3', function (request, response) {
response.end('<a href="/page1">Page1</a><a href="/page2">Page2</a><a href="/page3">Page3</a><a href="/notFound1">NotFound</a><a href="/redirectToRedirectToNotFound">redirectToRedirectToNotFound</a>');
});
app.get('/page4', function (request, response) {
response.end('<a href="/redirectToRedirectToNotFound">redirectToRedirectToNotFound</a>');
});
let server = app.listen(8080, function () {
const host = 'localhost';