Skip to content

Conversation

Erisa
Copy link
Member

@Erisa Erisa commented Jun 1, 2025

If disable-https is not set but HTTPS support is unconfigured or broken, warn the user and fall through to HTTP-only.

Removes the requirement to set disable-https for Headscale deployments.

@Erisa Erisa requested review from Copilot and kradalby and removed request for Copilot June 1, 2025 16:52
Copy link

@Copilot 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

This PR updates tclipd to gracefully fall back to HTTP when HTTPS is unavailable (instead of exiting), and documents this behavior in the README.

  • Replace fatal error on missing HTTPS support with a warning and automatic disable-https flag set
  • Ensure HTTP-only fallback is applied whenever disable-https is true
  • Update README to note that -disable-https becomes true automatically if HTTPS is unconfigured

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
cmd/tclipd/main.go Emit warning on missing HTTPS, set flag, and fallback to HTTP
README.md Clarify -disable-https flag behavior in usage table
Comments suppressed due to low confidence (1)

cmd/tclipd/main.go:741

  • [nitpick] This warning is quite long and could be harder to parse in logs; consider simplifying it (e.g., include only the key issue and the hostname) or using log.Printf for clearer formatting.
log.Println("warning: HTTPS is unavailable, please check that it is enabled in the admin panel and that the hostname is configured correctly. Proceeding with only HTTP.")

@Erisa Erisa force-pushed the erisa/conditional-https branch 2 times, most recently from f46bec7 to 23316cd Compare June 1, 2025 16:57
If disable-https is not set but HTTPS support is unconfigured or broken,
warn the user and fall through to HTTP-only.
@Erisa Erisa force-pushed the erisa/conditional-https branch from 23316cd to c2efc22 Compare June 1, 2025 16:58
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.

1 participant