-
We are planning a Angular web application with a partial SaaS model. The static site (SPA) request will need to proxied to a common URL for all the customers. Whereas, the api requests will need to be proxied to their respective API URL for the data (customer will be identified by the sub domain). I was thinking of having multiple "Paths" within the Match object, but Path is just a single string element. Do I have to create multple route objects for each unique path? //--------------------------------------- Intended Destination: http://www.somedomain.com //---------------------------------------- Intended Destination: http://api.abc.com:8080/ //---------------------------------------- Intended Destination: http://www.pqr.com:4334/ Can YARP in its current stage cater for the above requirement? If so, I would appreciate if you could point me to the right direction possibly with an example. YARP is exactly what I was looking for and can wait to see v1. Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Worst case you can define multiple routes pointing to the same destination. However, you should be able to reduce the redundancy using wildcards in both the host and path. E.g.: http://.domain.com/ -> http://www.somedomain.com In this setup it looks like you'd be programmatically generating the routes? In that case a little redundancy doesn't seem like a big issue, and the route table should scale pretty well. |
Beta Was this translation helpful? Give feedback.
Worst case you can define multiple routes pointing to the same destination. However, you should be able to reduce the redundancy using wildcards in both the host and path. E.g.:
http://.domain.com/ -> http://www.somedomain.com
http://.domain.com/swagger/index.html -> http://www.somedomain.com
In this setup it looks like you'd be programmatically generating the routes? In that case a little redundancy doesn't seem like a big issue, and the route table should scale pretty well.