Skip to content

HTTPS-only pages

Rob Watson requested to merge rfwatson/gitlab-pages:https_only into master

Overview

This patch introduces HTTPS-only pages as an option for projects and custom domains, based on an attribute in a project's config.json.

This is intended to support "HTTPS only pages" feature request, open MR: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/16273.

Changes

  • Check project's config.json for httpsonly attribute
  • If found in root context, all HTTP requests to groupname.gitlab.io/projectname/... will be 301 redirected to HTTPS
  • If found in custom domain context, all HTTP requests to this domain will be 301 redirected to HTTPS
  • Add acceptance tests

Notes/discussion points

  • This is the first serious Go code I've written so it may exhibit gotchas! All feedback/comments appreciated.
Edited by Rob Watson

Merge request reports