Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
由于预检 OPTIONS 请求,我的 REST SOAPUI 模拟服务失败了。我在 SOAPUI 中创建了一个 GET 模拟服务 /getAllStudents。当我尝试从 apache 服务器调用它时,浏览器调用了 OPTIONS getAllStudents,它因 404 错误而失败。有没有办法解决这个问题?
这听起来像是一个需要在服务器端解决的问题。对于您传入的 OPTIONS 请求,您的服务器将需要使用允许的方法以及使用以下标头的允许来源来回答:
Access-Control-Allow-Origin: http://foo.example Access-Control-Allow-Methods: POST, GET, OPTIONS