0
votes

On Google cloud, you can use appengine api to obtain *.appspot.com domain. How does one obtain customer domain in an instance whereby the domains are used as namespaces in a multi tenant application.

Say customer.example.com points to super-cool-app.appspot.com via DNS configuration CNAME, during request processing how can one obtain customer.example.com typically servers would broadcast SERVER_NAME via headers. Does Google cloud App Engine offer such headers?

1

1 Answers

1
votes

Looking through the AppEngine Docs at

https://cloud.google.com/appengine/docs/java/multitenancy/multitenancy#Java_Setting_the_current_namespace -

NamespaceManager.getGoogleAppsNamespace() would return the domain. The document states that this method returns blank if the App is hosted on appspot.

I've not tried this personally, but the docs look promising.