Reputation: 201
I want to use http-proxy-middleware
to route traffic of different applications to different cdn paths as below:
{
"app1.example.com": {
"target": "https://cdn.mydomain.com",
"pathRewrite": {
"^/": "/app1/"
},
"rewrites": {},
"headers": {
"X-App-Name": "app1"
},
"cors": {
"origin": "*",
"methods": "GET,POST"
}
},
...
...
"appX.example.com": {
"target": "https://cdn.mydomain.com",
"rewrites": {},
"pathRewrite": {
"^/": "/appX/"
},
"headers": {
"X-App-Name": "appX"
},
"cors": {
"origin": "*",
"methods": "GET,POST"
},
"redirects": {}
}
}
I want to store this information in some database( preferably redis because its fast) so that middleware proxy can pull information based on host header and serve different targets. can redis cause some problems... is there any other proxy setup I can use which is fast and can store information for different applications?
Upvotes: 0
Views: 69