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.
我认为它将哈希传递给 headers 方法,
但我不知道为什么
headers {"Access-Control-Allow-Headers" => "x-requested-with"}
不起作用。
为避免与块产生歧义,不允许使用该形式。您必须执行以下任一操作:
headers({"Access-Control-Allow-Headers" => "x-requested-with"})
或者
headers("Access-Control-Allow-Headers" => "x-requested-with")