weixin_33688840 2016-07-27 10:53 采纳率: 0%
浏览 256

Firefox忽略CORS方法

I'm implementing a web service with CORS support. Everything works fine, except when I issue a DELETE request. Firefox sends the following preflight:

OPTIONS /node-configuration?sessionId=cee013ce-53e6-11e6-8929-7efd7b6db237&address=127.0.0.1&port=8043 HTTP/1.1
Host: 127.0.0.1:8032
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Access-Control-Request-Method: DELETE
Origin: XXX
Connection: keep-alive

And the server responds with:

HTTP/1.1 200 OK
Content-Length: 0
Strict-Transport-Security: max-age=31536000; includeSubDomains
Access-Control-Allow-Origin: XXX
Access-Control-Allow-Method: POST, GET, DELETE, OPTIONS

As you can see, DELETE is in the Access-Control-Allow-Method header. But when I send the request:

DELETE /node-configuration?sessionId=cee013ce-53e6-11e6-8929-7efd7b6db237&address=127.0.0.1&port=8043
Accept: application/json, text/plain, */*
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.5
Connection: keep-alive
Host: 127.0.0.1:8032
Origin: XXX
Referer: XXX
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0

Firefox blocks it: method not found in CORS „Access-Control-Allow-Methods”

Am I missing something?

  • 写回答

1条回答 默认 最新

  • weixin_33709609 2016-07-27 10:56
    关注

    The header is called Access-Control-Allow-Methods, you missed out the s on the end in the response header.

    评论

    报告相同问题?

    悬赏问题

    • ¥15 我不明白为什么c#微软的官方api浏览器为什么不支持函数说明的检索,有支持检索函数说明的工具吗?
    • ¥15 ORBSLAM2框架跑ICL-NUIM数据集
    • ¥15 在我想检测ros是否成功安装时输入roscore出现以下
    • ¥30 老板让我做一个公司的投屏,实时显示日期,时间,安全生产的持续天数,完全没头绪啊
    • ¥15 Google Chrome 所有页面崩溃,三种解决方案都没有解决,我崩溃了
    • ¥20 使用uni-app发起网络请求,获取重定向302返回的cookie
    • ¥20 手机外部浏览器拉起微信小程序支付 (相关搜索:微信小程序)
    • ¥20 怎样通过一个网址找到其他同样模版的网址
    • ¥30 XIAO esp32c3 读取FDC2214的数据
    • ¥15 在工控机(Ubuntu系统)上外接USB蓝牙硬件进行蓝牙通信