I'm on Sitecore 10.2 so I don't have access to the new 10.3/XM Cloud functionality which accomplishes this out of the box.
I've implemented a robots.txt handler for Headless SXA as per this article: https://davegoosem.com/building-robots-txt-with-sitecore-jss-graphql/
It uses a custom GraphQL query to access the Settings item for the site. However, the path to that item is hardcoded.
How would I dynamically determine the context tenant and site, so that I can get the robots.txt content in a multisite implementation?