We created some sling servlents following this tutorial: https://aem.redquark.org/2018/10/day-17-working-with-query-builder-api.html. They make calls to a backend (player database), and pull in some content, and output json for the react page. e.g. oursite.com/bin/api/oursevlet
This will work well for our first site (aka tenant?)
However, if we create a new site, with a new URL, we will want the same servlet, but with the new sites URL, e.g. ourothersite.com/bin/api/ourservlet, but this should pull in different content.
Presumably, we could duplicate the servlet, but it might also be possible to do a redirect or similar behind the scenes? in this case, how would the servlet know which sites content to lookup? We could pass in the URL as a parameter, assuming a servlet in one tenant can access content from another.
To a lesser extent, would translations be an issue, as the servlet would need to know which language content to look for?