# Incorrect scheme set while proxying to a http/2 cleartext (h2c) backend

**URL:** <https://discourse.haproxy.org/t/incorrect-scheme-set-while-proxying-to-a-http-2-cleartext-h2c-backend/3618>\
**Category:** Help!\
**Created:** [March 14, 2019, 2:40pm UTC](https://discourse.haproxy.org/t/incorrect-scheme-set-while-proxying-to-a-http-2-cleartext-h2c-backend/3618 "2019-03-14T14:40:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shamsimam](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.haproxy.org/shamsimam/32/745_2.png) [@shamsimam](https://discourse.haproxy.org/u/shamsimam)\
**Post date:** [March 14, 2019, 2:40pm UTC](https://discourse.haproxy.org/t/incorrect-scheme-set-while-proxying-to-a-http-2-cleartext-h2c-backend/3618/1 "2019-03-14T14:40:06Z")

</div>

I am using HA-Proxy version 1.9.4 2019/02/06 for proxying HTTP/2 cleartext (h2c) traffic to a h2c backend. I am however seeing HA-Proxy set the :scheme **https** when proxying the request. When I hit the backend directly, the :scheme is set to **http**. I have verified this using wireshark (please see attached images).

Any suggestions on what I should change in my configuration so that I can set to make sure that the :scheme gets set to **http** while proxying the request?

I am using curl 7.54.0 to make requests:  
`$ curl --http2-prior-knowledge http://localhost:9090`

My HA-Proxy config file:

```auto
global
   maxconn 4096
   daemon

defaults
   log global
   option http-use-htx
   timeout connect 10s
   timeout client 30s
   timeout server 30s
   maxconn 3000

frontend waiter
    mode http
    bind *:9090 proto h2
    default_backend local_node

backend local_node
    mode http
    server localhost localhost:8080 proto h2

```

 ![nginx-via-haproxy](https://us1.discourse-cdn.com/flex016/uploads/haproxy/original/1X/aa88b7d02ef32900bdf94643d290ec0b25e9efc8.png)

 ![nginx-direct](https://us1.discourse-cdn.com/flex016/uploads/haproxy/original/1X/756edd95732c60547f4606946f52f15f2c167bc1.png)

 ![haproxy-config-image](https://us1.discourse-cdn.com/flex016/uploads/haproxy/original/1X/d08b925b51255b7bd7e14e9ab8e54931aa10106f.png)

---

<div class="post-metadata">

**Author:** ![shamsimam](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.haproxy.org/shamsimam/32/745_2.png) [@shamsimam](https://discourse.haproxy.org/u/shamsimam)\
**Post date:** [March 19, 2019, 2:21pm UTC](https://discourse.haproxy.org/t/incorrect-scheme-set-while-proxying-to-a-http-2-cleartext-h2c-backend/3618/2 "2019-03-19T14:21:14Z")

</div>

Any suggestions on how to get h2c working to the backend in this scenario (using mode http)?

---

<div class="post-metadata">

**Author:** ![shamsimam](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.haproxy.org/shamsimam/32/745_2.png) [@shamsimam](https://discourse.haproxy.org/u/shamsimam)\
**Post date:** [April 8, 2019, 3:31pm UTC](https://discourse.haproxy.org/t/incorrect-scheme-set-while-proxying-to-a-http-2-cleartext-h2c-backend/3618/3 "2019-04-08T15:31:16Z")

</div>

Filed an issue on github: [https://github.com/haproxy/haproxy/issues/77](https://github.com/haproxy/haproxy/issues/77)
