Google Cloud Functions enable CORS?

后端 未结 6 1680
暖寄归人
暖寄归人 2020-12-05 17:08

I just finished the Hello World Google Cloud Functions tutorial and received the following response headers:

Connection → keep-alive
Content-Length → 14
Cont         


        
6条回答
  •  误落风尘
    2020-12-05 18:01

    I'm the product manager for Google Cloud Functions. Thanks for your question, this has been a popular request.

    We don't have anything to announce just yet, but we're aware of several enhancements that need to be made to the HTTP invocation capabilities of Cloud Functions and we'll be rolling out improvements to this and many other areas in future iterations.

    UPDATE:

    We've improved the way you deal with HTTP in Cloud Functions. You now have full access to the HTTP Request/Response objects so you can set the appropriate CORS headers and respond to pre-flight OPTIONS requests (https://cloud.google.com/functions/docs/writing/http)

提交回复
热议问题