Skip to content

rewrite url + forward to new host does not apparently work #134

@geirih

Description

@geirih

I need to match a rule on pattern, rewrite the uri, and forward the resulting uri to a new host.

The following route results in a request to "/api/test/1234" to be forwarded to "http://localhost:8090/", not
"http://localhost:8090/newpath/1234" as expected.
return builder.routes() .route("test_route", r -> r.path("/api/test/**") .add(rewritePath("/api/test/","/newpath/")) .uri("http://localhost:8090") )
Is this a bug, or is the rule incorrect ? Please advice

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions