--
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 google-appengi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/0a5daf81-3a94-4fe7-b5bb-0edfcb8a83f9%40googlegroups.com.
<address_error.png><Screen Shot 2020-05-11 at 8.34.23 PM.png>
Look at the network activity debugger in your browser, or try hitting the URL using curl -v from the terminal.That will generally help you sort out what headers are being included.The rule you included would only add those headers to images, not your JSON stuff, but maybe that was just an example?FWIW, I think it’s way more natural to do this in the python code:
self.response.headers["Access-Control-Allow-Origin"] = "*"
On May 11, 2020, at 10:03 AM, Nutchapol Dendumrongsup <nutcha...@gmail.com> wrote:
Hello fellow developers and data scientists. I have a question about a problem with accessing the API deployed on the google app engine from the javascript app deployed on Heroku.When I access my API link on google chrome, it works properly. However, when I use my javascript app deployed on Heroku to call my API link, it sometimes does not work and return me the network error.I have followed the instruction on "https://cloud.google.com/appengine/docs/standard/python3/config/appref" to enable the CORS access on my app API in the app.ymal file on google app engine as the followingruntime: python37instance_class: F4_1Ghandlers:- url: /imagesstatic_dir: static/imageshttp_headers:Access-Control-Allow-Origin: ‘*’Similarly, I have also enabled the CORS access on my javascript app deployed on Heroku as shown in the picture attached. However, the problem still persists. I am not sure if it has to do with the way we set up our code or the google app engine server itself. If there is anything I could do besides what I have done I would love to hear that as well. Thanks a lot!--
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 google-a...@googlegroups.com.