Skip to content

fix: handle HTTPS Docker endpoints without downgrading to HTTP#999

Open
sjhddh wants to merge 1 commit intoglanceapp:mainfrom
sjhddh:fix/docker-containers-https-sock-path
Open

fix: handle HTTPS Docker endpoints without downgrading to HTTP#999
sjhddh wants to merge 1 commit intoglanceapp:mainfrom
sjhddh:fix/docker-containers-https-sock-path

Conversation

@sjhddh
Copy link
Copy Markdown

@sjhddh sjhddh commented Apr 11, 2026

Summary

  • Fixes Docker containers widget silently downgrading https:// endpoints to http://
  • The https:// prefix was missing from the scheme check, causing HTTPS URLs to fall through to the Unix socket code path
  • The request URL was hardcoded with http://, so even if parsed correctly, HTTPS would be lost

Changes

  • Added https:// to the prefix check in fetchDockerContainersFromSource
  • Captured the actual URL scheme instead of hardcoding http://
  • Mapped tcp://http:// (preserving existing behavior)
  • Default port is now 443 for HTTPS, 80 for HTTP/TCP

Test plan

  • go test ./... passes
  • Manual test with Docker endpoint over HTTPS
  • Verify tcp:// and http:// endpoints still work as before

Fixes #992

Docker containers widget silently downgrades HTTPS to HTTP because:
1. The prefix check only matches tcp:// and http://, so https:// falls
   through to the Unix socket code path
2. The request URL hardcodes 'http://' prefix

This patch adds https:// to the prefix check, preserves the parsed URL
scheme, and defaults the port to 443 for HTTPS connections.

Fixes glanceapp#992
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.

Docker containers widget doesn't allow sock-path with https://

1 participant