我有多租户 SaaS 应用程序,在启动时我设置如下路由:
https://my.com/customer1/mobile
https://my.com/customer1/integration
https://my.com/customer2/mobile
https://my.com/customer2/integration
https://my.com/customer3/mobile
https://my.com/customer3/integration
https://my.com/customer4/mobile
https://my.com/customer4/integration
当我添加新客户时,我必须回收池以便重建路由。我不确定这是否是我正在做的最好的方法......
我只能创建 2 条路线
https://my.com/mobile
https://my.com/integration
然后在 HTTP 标头中传递 AccountId 以及我的身份验证信息。会不会更干净?您如何看待性能,减少路线应该是有益的,对吗?