CORS post with preflight request

前端 未结 4 1274
小鲜肉
小鲜肉 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:44

    The subdomains are different. As far as CORS is concerned the subdomain, protocol and port have to be identical in the Origin and the Access-Control-Allow-Origin.

    In your example it looks like the origin is: https://www.example.com and the Access-Control-Allow-Origin is: https://files.example.com

提交回复
热议问题