How to apply CORS preflight cache to an entire domain

前端 未结 3 1250
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-29 20:33

I am building a REST application that makes use of CORS. Every REST call is different and I am finding that there is significant overhead in getting the preflight OPTIONS ca

3条回答
  •  天命终不由人
    2020-11-29 21:03

    One way is that you can point all your API calls to same domain as your front-end. Setup nginx on the front-end server to forward only API calls to API server. This will remove all pre-flight calls.

提交回复
热议问题