Commit a984125f authored by Torstein Nicolaysen's avatar Torstein Nicolaysen Committed by Torstein
Browse files

DEICH-5952 disallow scraping in non-prod environments

parent a6ef37e5
......@@ -181,7 +181,12 @@ app
// Allow crawling all content
server.use("/robots.txt", (req, res) => {
res.type("text/plain");
res.send("User-agent: *\nDisallow:");
if (dev) {
res.send("User-agent: *\nDisallow: /"); // Disallow everything
} else {
res.send("User-agent: *\nDisallow:"); // Allow everything
}
});
// Check for redirects
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment