When using Traefik as proxy requests get manipulated in an unwanted way. This leads to errors with the site accessed. Can someone suggest whether this is a configuration problem or maybe a bug?
The working URL is this (site is accessed directly):
GET /fhem?XHR=1&inform=type=status;filter=WEB;since=1660663766.28339;fmt=JSON&fw_id=31648
When I request the same through Traefik as proxy the URL is changed to this:
GET /fhem?XHR=1&inform=type=status&filter=WEB&since=1660663582.13987&fmt=JSON&fw_id=31596
The ; are replaced by &.
This is my configuration in the compose file:
reverseproxy:
image: traefik
restart: always
command:
- --api.insecure=true
- --entrypoints.websecure.address=:443
- --providers.docker
- --providers.docker.exposedByDefault=false
- --providers.file.directory=/etc/traefik/dynamic_conf
ports:
- "80:80"
- "443:443"
# The Web UI (enabled by --api.insecure=true)
- "8085:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./reverseproxy/traefik.yml:/etc/traefik/dynamic_conf/conf.yml:ro
- ./reverseproxy/cert.pem:/certs/cert.pem:ro
- ./reverseproxy/key.pem:/certs/key.pem:ro
And these are the labels on the container that is accessed:
labels:
- "traefik.http.routers.fhem.rule=PathPrefix(`/fhem`)"
- "traefik.http.services.fhem.loadbalancer.server.port=8083"
- "traefik.http.routers.fhem.entrypoints=websecure"
- "traefik.http.routers.fhem.tls=true"
- "traefik.enable=true"
Hi Cheanrod and welcome to the traefik forum.
This behavior started with version 2.7.2. There is an open issue on GitHub:
opened 08:05AM - 05 Jul 22 UTC
kind/bug/possible
area/rules
contributor/waiting-for-feedback
### Welcome!
- [X] Yes, I've searched similar issues on [GitHub](https://github… .com/traefik/traefik/issues) and didn't find any.
- [X] Yes, I've searched similar issues on the [Traefik community forum](https://community.traefik.io) and didn't find any.
### What did you do?
I have a request like `https://whoami.example.com/?testurl=http://test/?a=1;b=2;c=3`
I expect the request to be `GET /?testurl=http://test/?a=1;b=2;c=3 HTTP/1.1`
The issue can be reproduced with using
### What did you see instead?
Request is `GET /?testurl=http://test/?a=1&b=2&c=3 HTTP/1.1`
### What version of Traefik are you using?
Issue starts with version 2.7.2
```
Version: 2.7.3
Codename: epoisses
Go version: go1.17.11
Built: 2022-06-29T13:48:15Z
OS/Arch: linux/amd64
```
### What is your environment & configuration?
```
services:
whoami:
image: "containous/whoami"
restart: unless-stopped
labels:
- "traefik.enable=true"
- "traefik.http.routers.wwhoami.entrypoints=web-secure"
- "traefik.http.routers.wwhoami.rule=Host(`whoami.example.com`)"
- "traefik.http.routers.wwhoami.tls=true"
- "traefik.http.routers.wwhoami.tls.certresolver=acme"
- "traefik.http.routers.wwhoami.middlewares=secHeaders@file"
- "traefik.http.services.wwhoami.loadbalancer.server.port=80"
networks:
- traefik_servicenet
networks:
traefik_servicenet:
external: true
name: traefik_servicenet
```
Configuration like https://github.com/wollomatic/traefik2-hardened with a few changes such as http3 disabled.
### If applicable, please paste the log output in DEBUG level
_No response_
Regards,
Wolfgang
Hi wollomatic,
thanks for pointing me to the existing issue. I will follow the discussion there.
system
Closed
August 20, 2022, 4:50am
4
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.