I don't know, if my question is well formulated, but I try... I'm using yarp as a reverse proxy. Behind the proxy there is a asp.net core service (order-service) on port 5048 e.g.
So the config looks like the following:
"ReverseProxy": {
"Routes": {
"orderService": {
"ClusterId": "orderServiceProps",
"Match": {
"Path": "/order-service/{**Remainder}"
},
"Transforms": [
{
"PathRemovePrefix": "/order-service"
}
]
}
},
"Clusters": {
"orderServiceProps": {
"Destinations": {
"destination1": {
"Address": "http://localhost:5048"
}
}
}
}
}
If I type e.g. http://localhost:8080/order-service/api/collection the request gets forwarded to http://localhost:5048/api/collection
All well so far.
But the order-service also has a simple html gui, which is showing some simple links to some special endpoints.
Now if I click on e.g. the settings link, the service navigates to http://localhost:5048/settings but I want the service navigates to http://localhost:8080/order-service/settings
I don't know if I can reach such a bahavior.
I don't want the user is seeing the 5048 in his browser!
And can I do this without let the service know that it is behind a proxy?