Hello,
According to the App Identity documentation
<https://cloud.google.com/appengine/docs/standard/python/appidentity/>
.....By default, App Engine apps are served from URLs in the form
http://<your_app_id>.appspot.com, where the app ID is part of the hostname.
If an app is served from a custom domain, it may be necessary to retrieve
the entire hostname component. You can do this using the
app_identity.get_default_version_hostname() method....
However, when I print the output for
app_identity.get_default_version_hostname(), it gives me
http://<project_name>.appspot.com.. not my custom domain. But if I look at
my log files, the entry for host under the "protopayload" is my custom
domain i.e. I see something like.....
protoPayload: {
@type: "type.googleapis.com/google.appengine.logging.v1.RequestLog"
appEngineRelease:
*appId: <APP_ID>*
cost: 1.16787e-7
endTime:
finished: true
first: true
*host: "<MY_CUSTOM_DOMAIN_URL>*
My questions are
1) Does it mean app_identity.get_default_version_hostname() is not meant to
give me my custom domain url?
2) If #1 is true, how do I programmatically determine the custom domain
url? I don't want to hardcode it so that the same code can be used for
different projects and different custom domain names
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-appengine/38fa3a38-4566-4905-a471-1a6867ecb651%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.