google cloud function python CORS error No 'Access-Control-Allow-Origin' header is present on the requested resource.
问题 Ive followed instructions at https://cloud.google.com/functions/docs/writing/http#functions_http_cors-python So my code has this at the end # Set CORS headers for the preflight request if request.method == 'OPTIONS': # Allows GET requests from any origin with the Content-Type # header and caches preflight response for an 3600s headers = { 'Access-Control-Allow-Origin': '*', 'Access-Control-Allow-Methods': 'GET', 'Access-Control-Allow-Headers': 'Content-Type', 'Access-Control-Max-Age': '3600'