Chapter 9: Malicious input samples
This commit is contained in:
@@ -2,13 +2,13 @@ const express = require("express");
|
||||
const app = express();
|
||||
const he = require("he");
|
||||
|
||||
app.get("*", (req, res) => {
|
||||
app.get("/", (req, res) => {
|
||||
const { previous, lang, token } = req.query;
|
||||
getServiceStatus((status) => {
|
||||
const href = he.encode(`${previous}${token}/${lang}`);
|
||||
res.send(`
|
||||
<h1>Service Status</h1>
|
||||
<div id=status>
|
||||
<div id=status>
|
||||
${status}
|
||||
</div>
|
||||
<div>
|
||||
@@ -26,4 +26,3 @@ getServiceStatus = (callback) => {
|
||||
app.listen(3000, () => {
|
||||
console.log("Server listening on port 3000");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user