[go: up one dir, main page]

Skip to content

Disabling HTTP2 does not work as expected

Summary

Hello,

I just tried to disable http2 support for gitlab as I had some issues with failing composer requests. Disabling h2 support fixed this issue for me. After enabling Gitlab Pages for my Gitlab instance these errors occured again.

It seems that every Service of the Gitlab Stack has its own setting for h2 support but you can not configure them independently.

nginx['http2_enabled'] = false
registry_nginx['http2_enabled'] = false
gitlab_pages['use_http2'] = false

If you use the build in nginx server, switching on one of them causes http2 support for all services. This seems to be related to Nginx's behavior that the listen directive is not restricted to the server block in which it is defined.

Steps to reproduce

  • Use the Gitlab docker image
  • Configure http2 support for Gitlab Pages
  • Disable http2 support for gitlab ui and registry
  • Open your Gitlab ui and check the used protocol

What is the current bug behavior?

You should see h2 as protocol used.

What is the expected correct behavior?

As http2_enabled is false, I would expect an HTTP/1.1 connection.

Possible fixes

I am not sure if this can be solved technically. I would expect at least an obvious hint about this behavior in the documentation. I also find it very confusing that these configuration options exist at all if you can't use them independently.