Skip to content

Commit d0367ec

Browse files
committed
add warning if page punches through
1 parent 20aac12 commit d0367ec

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

server.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ fastify.listen({
8989
port: PORT,
9090
host: "0.0.0.0",
9191
});
92+
fastify.setNotFoundHandler((request, reply) => {
93+
console.error("PAGE PUNCHED THROUGH SW - " + request.url);
94+
reply.code(593).statusMessage("INVALID").send("punch through");
95+
});
9296
console.log(`Listening on http://localhost:${PORT}/`);
9397
if (!process.env.CI) {
9498
try {

0 commit comments

Comments
 (0)