AWS API Gateway - CORS “access-control-allow-origin” - multiple entries

后端 未结 4 990
南方客
南方客 2020-12-31 09:13

I have a AWS Lambda instance that connects to a defined AWS API Gateway. If I enable CORS and give the access-control-allow-origin a definition of http:/

4条回答
  •  时光说笑
    2020-12-31 10:12

    Unfortunately this is not possible today. The CORS spec does not allow for partial wild cards and currently API Gateway only allows a single static value for the header.

    You may be able to overload your OPTIONS method to return this value dynamically based on the incoming host header.

提交回复
热议问题