Skip to content

Add no_index option to block search engine crawlers#844

Merged
mxpv merged 1 commit intomainfrom
robots
Mar 9, 2026
Merged

Add no_index option to block search engine crawlers#844
mxpv merged 1 commit intomainfrom
robots

Conversation

@mxpv
Copy link
Copy Markdown
Owner

@mxpv mxpv commented Mar 9, 2026

Closes: #772

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a no_index server configuration option to help prevent search engines from indexing the hosted content by serving a restrictive robots.txt and applying an X-Robots-Tag response header when enabled.

Changes:

  • Extend services/web server config with NoIndex (toml:"no_index") and wire it into server initialization.
  • Add middleware to attach X-Robots-Tag: noindex, nofollow and a /robots.txt handler when configured.
  • Add config parsing tests and update docs to describe the new option and endpoint.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
services/web/server.go Adds NoIndex config flag, /robots.txt handler, and middleware to set X-Robots-Tag.
services/web/server_test.go Adds tests covering default disabled behavior and enabled behavior for robots/header.
cmd/podsync/config_test.go Adds TOML config parsing tests for no_index.
CLAUDE.md Documents the new no_index setting and /robots.txt endpoint.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mxpv mxpv merged commit 51f8da8 into main Mar 9, 2026
13 checks passed
@mxpv mxpv deleted the robots branch March 9, 2026 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Add robots.txt to block search engine indexing

2 participants