This is something useful, some times it can be useful to add a custom header but to a different domain name, let's take a look at this scenario, let's supposed you've got a Multitenant application and there are many databases, and an user can be stored in one of those databases, we need to identify in somehow in the login where that customer comes from, and what about if we have got several domain names pointing to the same application server like this
companyone.com --> applicationServer
companytwo.com --> applicationServer
companythree.com --> applicationServer
we must identify with Nginx where the request is coming from, and set a custom token ID in the header so in that way the front can get that token ID from the header and send it to the backend and once it is in there we can then now know from which database belongs that token ID
companyone.com --> applicationServer
companytwo.com --> applicationServer
companythree.com --> applicationServer
we must identify with Nginx where the request is coming from, and set a custom token ID in the header so in that way the front can get that token ID from the header and send it to the backend and once it is in there we can then now know from which database belongs that token ID
Comments
Post a Comment