I did a migration of a python 2 app in the standard environment to python 3. One of the things that changed was how we communicated with other services. For instance we communicated to another service like this:
urlfetch.create_rpc(deadline=60)
urlfetch.make_fetch_call(rpc, url)
And in the other service we checked the header X-Appengine-Inbound-Appid to see it the call came from an authorized app.
In python3 standard environment we do not have urlfetch anymore, so I switched to using requests like this:
requests.get(url, timeout=60)
but the header X-Appengine-Inbound-Appid is not being set anymore so I just get 403s from the other app
I tried changing the request to use the fully versioned service after reading this:
https://cloud.google.com/appengine/docs/standard/python3/communicating-between-servicesso I have an URL like this: https://[VERSION_ID]-dot-[SERVICE_ID]-dot-[MY_PROJECT_ID].
appspot.comBut the X-Appengine-Inbound-Appid is still not being set.
Is there another way to make the call for it to be set or this is just not possible in python 3 standard environments?