Skip to content

Commit

Permalink
Merge pull request #22 from wunderio/feature/nofollow-upscale
Browse files Browse the repository at this point in the history
x-robots-tag and status 404 for upscaler page
  • Loading branch information
Rade333 authored May 21, 2024
2 parents 9a82a6c + c354172 commit f12e624
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,10 @@ app.get('*', async (req, res) => {
const annotations = currentIngress.metadata.annotations;
if (annotations['auto-downscale/down']) {
console.log(`Showing placeholder for ${hostname}`)
res.send(placeholderPageContent(hostname, currentIngress.metadata.name));
// always send header "x-robots-tag"
res.append("x-robots-tag", "noindex, nofollow, nosnippet, noarchive")
// set response status to 404, but do show :Launch" button
res.status(404).send(placeholderPageContent(hostname, currentIngress.metadata.name));
}
else {
res.sendStatus(404);
Expand Down

0 comments on commit f12e624

Please sign in to comment.