Firefox fails on CORS resource, while Chrome and Safari work

狂风中的少年 提交于 2019-12-20 04:17:16

问题


I have a seemingly correct resource backed by a CouchDB installation. Requests are made using JS Axios. Both Chrome and Safari work, Firefox 65.0 fails however with

CORS header 'Access-Control-Allow-Origin' does not match 'http://localhost:8080, *'

The server (CouchDB) does, in fact, not deliver

 'http://localhost:8080, *' as Access-Control-Allow-Origin 

but

 Access-Control-Allow-Origin http://localhost:8080
 Access-Control-Expose-Headers content-type, cache-control, a…e-newrev, x-couchdb-body-time

due to its configuration CORS accept requests from all domains ('*').

This, as mentioned, perfectly works for the other browsers. But fails for Firefox. I really don't seem to find the resason resp. a solution for this, and keep wondering where the additional '*' comes from that, Firefox wants to see.


回答1:


@sideshowbarker thanks for the hint - indeed, the behaviour was due to an extension - namely this one https://addons.mozilla.org/en-US/firefox/addon/cross-domain-cors/ after disabling this extension cors worked as expected!



来源:https://stackoverflow.com/questions/54618192/firefox-fails-on-cors-resource-while-chrome-and-safari-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!