Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in parcing #17

Open
Thesam1798 opened this issue Mar 8, 2021 · 2 comments
Open

Error in parcing #17

Thesam1798 opened this issue Mar 8, 2021 · 2 comments

Comments

@Thesam1798
Copy link

Background :

Traefik : latest
Provider : File and Docker
Server's OS: Ubuntu 20.04

Rewrite configuration :

[http.middlewares]
  [http.middlewares.rewrite-foo.plugin.rewritebody]
    lastModified = false

    [[http.middlewares.rewrite-foo.plugin.rewritebody.rewrites]]
      regex = 'http://'
      replacement = 'https://'

Docker configuration :

services:
  test:
    container_name: test
    image: thesam1798/liberty:web
    depends_on:
      - reverse-proxy
    volumes:
      - "/srv/docker/www/test:/app"
    labels:
      - "traefik.enable=true"

      - "traefik.http.routers.gestion.rule=Host(`XXXXXXXXXXXXX`)"
      - "traefik.http.routers.gestion.entrypoints=websecure"
      - "traefik.http.routers.gestion.tls=true"
      - "traefik.http.routers.gestion.tls.certresolver=sslresolver"

      - "traefik.http.routers.gestion.middlewares=rewrite-foo@file"
      - "traefik.http.middlewares.gestion-middlewares.compress=true"

Describe the bug

Parcing works but not every time

To Reproduce

it doesn't work :
in index.html :

<body class="ini-expand-fea">
	TEST|http://|TEST
</body>

http://

to make it work remove any character

Screen

2021-03-08_12-45

@Zomblard
Copy link

Zomblard commented Mar 8, 2021

Hey, i have the same problem

@wangfeng22
Copy link

wangfeng22 commented Jun 20, 2022

[http.middlewares]
[http.middlewares.rewrite-foo.plugin.rewritebody]
lastModified = false

[[http.middlewares.rewrite-foo.plugin.rewritebody.rewrites]]
  regex = 'http://'
  replacement = 'https://'

Try the following configuration.

[http.middlewares]
  [http.middlewares.rewrite-foo.plugin.rewritebody]
    lastModified = false

    [[http.middlewares.rewrite-foo.plugin.rewritebody.rewrites]]
      regex = 'http:\/\/'
      replacement = 'https:\/\/'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants