CORS post with preflight request

前端 未结 4 1275
小鲜肉
小鲜肉 2021-02-06 10:12

I\'m trying to upload files to a service on a different domain using CORS, but they keep failing due to the origin being denied. As far as I can see the correct headers are bein

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-06 10:47

    Try adding Cache-Control and Pragma to the list of allowed headers in the preflight. The full header should look like this:

    Access-Control-Allow-Headers: Cache-Control, Pragma, Origin, Authorization, Content-Type
    

提交回复
热议问题