# How to make WebSockets work with Traefik 2.0 (setting up Rancher)

**URL:** <https://community.traefik.io/t/how-to-make-websockets-work-with-traefik-2-0-setting-up-rancher/1732>\
**Category:** Traefik v2\
**Tags:** rancher, docker\
**Created:** [September 19, 2019, 1:54pm UTC](https://community.traefik.io/t/how-to-make-websockets-work-with-traefik-2-0-setting-up-rancher/1732 "2019-09-19T13:54:01Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![mrvn](https://avatars.discourse-cdn.com/v4/letter/m/f07891/32.png) [@mrvn](https://community.traefik.io/u/mrvn)\
**Post date:** [September 26, 2019, 2:20pm UTC](https://community.traefik.io/t/how-to-make-websockets-work-with-traefik-2-0-setting-up-rancher/1732/2 "2019-09-26T14:20:49Z")

</div>

Found the solution, just add that middleware to your secure endpoint route:

```auto
traefik.http.middlewares.sslheader.headers.customrequestheaders.X-Forwarded-Proto = https

```

---

_[View the full topic](https://community.traefik.io/t/how-to-make-websockets-work-with-traefik-2-0-setting-up-rancher/1732)._
