[PR #2643] [MERGED] feat: add robots.txt #2778

Closed
opened 2025-12-29 04:18:56 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/2643
Author: @eyJhb
Created: 6/6/2025
Status: Merged
Merged: 8/10/2025
Merged by: @nblock

Base: mainHead: add-robots-txt


📝 Commits (1)

📊 Changes

3 files changed (+18 additions, -0 deletions)

View changed files

📝 CHANGELOG.md (+2 -0)
📝 hscontrol/app.go (+1 -0)
📝 hscontrol/handlers.go (+15 -0)

📄 Description

I've added /robots.txt handler+endpoint, so to avoid crawlers (if they respect it). I was unsure of where to place the handler, and the endpoint logic, but I've just tried to group it together with others that seemed to make sense.

Should there be added any unit test/integration test for this change? My initial thought is no. But I'm uncertain if there are hard requirements for this, for any features :)

  • have read the CONTRIBUTING.md file
  • raised a GitHub issue or discussed it on the projects chat beforehand
  • added unit tests
  • added integration tests
  • updated documentation if needed
  • updated CHANGELOG.md

I'll add a changelog entry after this PR has been opened.

Fixes #2535


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/juanfont/headscale/pull/2643 **Author:** [@eyJhb](https://github.com/eyJhb) **Created:** 6/6/2025 **Status:** ✅ Merged **Merged:** 8/10/2025 **Merged by:** [@nblock](https://github.com/nblock) **Base:** `main` ← **Head:** `add-robots-txt` --- ### 📝 Commits (1) - [`42a29c1`](https://github.com/juanfont/headscale/commit/42a29c13037ed9b0e9fa2856f721c59dae62db0f) feat: add robots.txt ### 📊 Changes **3 files changed** (+18 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+2 -0) 📝 `hscontrol/app.go` (+1 -0) 📝 `hscontrol/handlers.go` (+15 -0) </details> ### 📄 Description I've added `/robots.txt` handler+endpoint, so to avoid crawlers (if they respect it). I was unsure of where to place the handler, and the endpoint logic, but I've just tried to group it together with others that seemed to make sense. Should there be added any unit test/integration test for this change? My initial thought is no. But I'm uncertain if there are hard requirements for this, for any features :) - [x] have read the [CONTRIBUTING.md](./CONTRIBUTING.md) file - [x] raised a GitHub issue or discussed it on the projects chat beforehand - [ ] added unit tests - [ ] added integration tests - [ ] updated documentation if needed - [x] updated CHANGELOG.md I'll add a changelog entry after this PR has been opened. Fixes #2535 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 04:18:56 +01:00
adam closed this issue 2025-12-29 04:18:56 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2778