# Traefik forward auth

**URL:** <https://community.traefik.io/t/traefik-forward-auth/968>\
**Category:** Traefik v2\
**Tags:** docker\
**Created:** [July 21, 2019, 8:56am UTC](https://community.traefik.io/t/traefik-forward-auth/968 "2019-07-21T08:56:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gintsgints](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/gintsgints/32/482_2.png) [@gintsgints](https://community.traefik.io/u/gintsgints)\
**Post date:** [July 21, 2019, 8:56am UTC](https://community.traefik.io/t/traefik-forward-auth/968/1 "2019-07-21T08:56:20Z")

</div>

I have testing docker-compose:

```auto
  demo:
    image: mendhak/http-https-echo
    labels:
      - traefik.frontend.auth.forward.address=http://192.168.0.101:8082
      - traefik.frontend.auth.forward.authResponseHeaders=cookie
      - traefik.frontend.rule=Host:demo.lattelecom.io
      - traefik.port=80

```

And testing server:

```auto
      http.createServer(function (req, res) {
        if (req.headers['x-forwarded-uri'] === '/protected') {
          res.writeHead(403, { 'Content-Type': 'text/html' });
          res.write('Access Denied!');
          res.end();
        } else {
          res.writeHead(200, { 'Content-Type': 'text/html' });
          res.write('Hello World!');
          res.end();
        }
      }).listen(8082);

```

Why my test server is beeing called two times per one request to demo service?

---

<div class="post-metadata">

**Author:** ![gintsgints](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/gintsgints/32/482_2.png) [@gintsgints](https://community.traefik.io/u/gintsgints)\
**Post date:** [July 21, 2019, 9:52am UTC](https://community.traefik.io/t/traefik-forward-auth/968/2 "2019-07-21T09:52:36Z")

</div>

My bad. That was web sending request for favicon ☹
