mohammed firdous

GitLab Pages TLS Refactoring

Contributed to GitLab Pages by refactoring TLS certificate handling code to improve organization and maintainability.

I refactored TLS certificate lookup code in GitLab Pages by moving domain certificate retrieval out of app.go into a dedicated internal/tls package.

The goal was to reduce coupling in the main application path and make certificate logic easier to test and extend.

What shipped:

  • extracted GetCertificateForDomain,
  • updated TLS config wiring to use the new package,
  • added tests and fixed type/import issues during review.

Maintainers requested iterative improvements on signatures, error handling, and coverage before merge, which improved the final patch quality.

Links: MR !1139Issue #708