Skip to content

Rewrite broken in 0.10? #1624

Closed
Closed
@jleclanche

Description

The following caddyfile's rewrite directive is ignored in 0.10.0 (I reverted to 0.9.5 and confirmed it working):

api.example.com {
        root /opt/example.com/latest/source
        redir / /v1 307 {
                if {path} is /
        }
        rewrite {
                r ^/v1(.*)
                to /api/{path}
        }
        gzip
        proxy / [::1]:8000 {
                transparent
                except /static /robots.txt /favicon.ico
        }
}

I can't figure it out. I can't get it to match at all, it's like it's being completely ignored. Tried a bunch of variations including a plain rewrite / /foo and it's just like it's commented out.

Metadata

Assignees

No one assigned

    Labels

    duplicate 🖇️This issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions