[PR #2478] [MERGED] Set content-type to JSON for some debug endpoints #2684

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

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/2478
Author: @nblock
Created: 3/15/2025
Status: Merged
Merged: 3/16/2025
Merged by: @nblock

Base: mainHead: json


📝 Commits (1)

  • abecace Set content-type to JSON for some debug endpoints

📊 Changes

2 files changed (+8 additions, -10 deletions)

View changed files

📝 config-example.yaml (+2 -4)
📝 hscontrol/debug.go (+6 -6)

📄 Description

Some endpoints in /debug send JSON data as string. Set the Content-Type header to "application/json" which renders nicely in Firefox.

Mention the /debug route in the example configuration.


  • 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

🔄 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/2478 **Author:** [@nblock](https://github.com/nblock) **Created:** 3/15/2025 **Status:** ✅ Merged **Merged:** 3/16/2025 **Merged by:** [@nblock](https://github.com/nblock) **Base:** `main` ← **Head:** `json` --- ### 📝 Commits (1) - [`abecace`](https://github.com/juanfont/headscale/commit/abecace21a974b35914e9d5de45aa4314ad006b7) Set content-type to JSON for some debug endpoints ### 📊 Changes **2 files changed** (+8 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `config-example.yaml` (+2 -4) 📝 `hscontrol/debug.go` (+6 -6) </details> ### 📄 Description Some endpoints in /debug send JSON data as string. Set the Content-Type header to "application/json" which renders nicely in Firefox. Mention the /debug route in the example configuration. --- - [x] have read the [CONTRIBUTING.md](./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 --- <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:22:20 +01:00
adam closed this issue 2025-12-29 03:22:20 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2684