Here is my use case:
Front-end application running in a POD.
Back-end running in a différent POD.
Route are:
myapp.example.com/ --> Front-end
myapp.example.com/api --> Back-end
I would like to be able to rewrite the path and remove the "/api" portion, so the Backend would not see this path. Otherwise, I have to tell evey backend developer to add a "/api" or something else prefix to their application.
Just like proxyTable in webpack:
proxyTable: {
'/api': {
target: 'http://localhost:3000',
changeOrigin: true,
pathRewrite: {
'^/api': ''
},
}
Suggestion ===================
apiVersion: v1
kind: Route
metadata:
labels:
name: my-app-route
name: my-app-route
spec:
host: my-app.cloudapps.example.com
path: /api/kipos
rewrite: / <======= would be nice to tell reverse proxy to remove the path
port:
targetPort: flaskapi
to:
kind: Service
name: my-app-svc
weight: 100
wildcardPolicy: None
tls:
termination: edge
Thanks for your help !
Here is my use case:
Front-end application running in a POD.
Back-end running in a différent POD.
Route are:
myapp.example.com/ --> Front-end
myapp.example.com/api --> Back-end
I would like to be able to rewrite the path and remove the "/api" portion, so the Backend would not see this path. Otherwise, I have to tell evey backend developer to add a "/api" or something else prefix to their application.
Just like proxyTable in webpack:
proxyTable: {
'/api': {
target: 'http://localhost:3000',
changeOrigin: true,
pathRewrite: {
'^/api': ''
},
}
Suggestion ===================
Thanks for your help !