CORS request not working in Safari

后端 未结 13 1505
忘掉有多难
忘掉有多难 2020-11-27 06:04

I am making a CORS xhr request. This works fine in chrome, however when I run in safari I get an \'Can not load ---- access not allowed by Access-control-allow-origin\'.

13条回答
  •  感动是毒
    2020-11-27 06:37

    When I try

    curl -v -X OPTIONS \
      -H 'Origin: fflog.storage.googleapis.com' \
      -H 'Access-Control-Request-Method: GET'  \
      https://storage.googleapis.com/fflog/135172watersupplies_json
    

    I get, among other headers:

    Access-Control-Allow-Origin: *
    

    When I execute AJAX requests against https://storage.googleapis.com/fflog/135172watersupplies_json from Safari 6.0.4 on Mac OS 10.8.3 I get 403 errors, but they do all execute.

    So I can only guess that you are trying to send a credentialed request for which a wildcard Access-Control-Allow-Origin is not allowed.

提交回复
热议问题