[PR #1422] [CLOSED] Support hosting headscale with an HTTP path prefix #2103

Closed
opened 2025-12-29 03:19:46 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/1422
Author: @kev-the-dev
Created: 5/5/2023
Status: Closed

Base: mainHead: kev-the-dev/http-path


📝 Commits (2)

📊 Changes

5 files changed (+91 additions, -16 deletions)

View changed files

📝 CHANGELOG.md (+3 -0)
📝 app.go (+33 -15)
📝 config-example.yaml (+6 -0)
📝 docs/reverse-proxy.md (+36 -0)
📝 noise.go (+13 -1)

📄 Description

Add support for hosting headscale endpoints with a HTTP path prefix. This is a feature requested by several developers, mainly to support running headscale behind a reverse proxy where there are other backends which headscale should not conflict with.

Unfortunately, through testing the tailscale client implementation has some strange behavior when adding a path to --login-server. It respects this prefix for certain endpoints, but does not for /derp, /ts2021, and /bootstrap-dns.

Additionally, the admin API at /api/v1 breaks if you host it with a path prefix as the paths are hardcoded into the generated code from swagger.

These considerations were applied to this implementation so that only the supports paths will use the path prefix, and documentation was updated to clarify this.

Closes #1126

  • read the CONTRIBUTING guidelines
  • 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

🔄 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/1422 **Author:** [@kev-the-dev](https://github.com/kev-the-dev) **Created:** 5/5/2023 **Status:** ❌ Closed **Base:** `main` ← **Head:** `kev-the-dev/http-path` --- ### 📝 Commits (2) - [`ecf3136`](https://github.com/juanfont/headscale/commit/ecf3136071ccb68cda1504110dff0dd964296644) Support hosting server at a path - [`bcf18fe`](https://github.com/juanfont/headscale/commit/bcf18fe1859d95f21d6346fd59a54c3bbb0af1a3) changelog ### 📊 Changes **5 files changed** (+91 additions, -16 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+3 -0) 📝 `app.go` (+33 -15) 📝 `config-example.yaml` (+6 -0) 📝 `docs/reverse-proxy.md` (+36 -0) 📝 `noise.go` (+13 -1) </details> ### 📄 Description Add support for hosting headscale endpoints with a HTTP path prefix. This is a feature requested by several developers, mainly to support running headscale behind a reverse proxy where there are other backends which headscale should not conflict with. Unfortunately, through testing the tailscale client implementation has some strange behavior when adding a path to `--login-server`. It respects this prefix for certain endpoints, but does not for `/derp`, `/ts2021`, and `/bootstrap-dns`. Additionally, the admin API at `/api/v1` breaks if you host it with a path prefix as the paths are hardcoded into the generated code from swagger. These considerations were applied to this implementation so that only the supports paths will use the path prefix, and documentation was updated to clarify this. Closes #1126 - [x] read the [CONTRIBUTING guidelines](README.md#contributing) - [x] raised a GitHub issue or discussed it on the projects chat beforehand - [ ] added unit tests - [ ] added integration tests - [x] updated documentation if needed - [x] updated CHANGELOG.md --- <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 03:19:46 +01:00
adam closed this issue 2025-12-29 03:19:46 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2103