[go: up one dir, main page]

Skip to content

Disabling HTTP2 for Gitlab Pages does not seem to work

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

Hello,

recently I had to disable HTTP2 support for gitlab pages (related to this issue #391703 (moved)). Sadly I wasn't able to turn off h2 support for Gitlab Pages.

I am using the Gitlab docker image and my configuration is part of my docker compose file. The configuration of my instances works well, but the setting gitlab_pages['use_http2'] to false doesn't seem to have any effect. In /var/opt/gitlab/nginx/conf/gitlab-pages.conf you can still find http2 in the listen directive:

listen *:443 ssl http2;

This is the related part of my configuration:

    environment:
      GITLAB_OMNIBUS_CONFIG: |
        # Gitlab
        external_url 'https://<%= @hostname %>'
        letsencrypt['enable'] = false
        nginx['redirect_http_to_https'] = true
        nginx['http2_enabled'] = false

        # Docker Registry
        registry_external_url 'https://docker.***'
        registry_nginx['redirect_http_to_https'] = true
        registry_nginx['http2_enabled'] = false

        # Pages
        pages_external_url 'https://pages.ryze-digital.de'
        pages_nginx['enable'] = false
        pages_nginx['redirect_http_to_https'] = true
        gitlab_pages['access_control'] = true
        gitlab_pages['cert'] = "/etc/gitlab/ssl/***.crt"
        gitlab_pages['cert_key'] = "/etc/gitlab/ssl/***.key"
        gitlab_pages['use_http2'] = false

Steps to reproduce

  • Set up a Gitlab instance using Docker compose
  • Configure Gitlab and Gitlab Pages with HTTPS support (A prerequisite for HTTP2)
  • Disable HTTP2 support for Gitlab Pages
  • Make sure your settings are applied: restart the container / run reconfigure
  • Check the /var/opt/gitlab/nginx/conf/gitlab-pages.conf configuration

What is the current bug behavior?

You will find

listen *:443 ssl http2;

What is the expected correct behavior?

It should be

listen *:443 ssl;
Edited by 🤖 GitLab Bot 🤖