我有錯誤:錯誤使用「訪問控制允許來源」,當我有「訪問控制允許來源:*」
XMLHttpRequest cannot load http://localhost:5984/cp_config/ . A wildcard '*' cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true. Origin ' http://localhost ' is therefore not allowed access. The credentials mode of an XMLHttpRequest is controlled by the withCredentials attribute.
但我有頭:
res.header("Access-Control-Allow-Origin", "*");
我該如何解決這個問題?
打開瀏覽器,調試器和網絡面板檢查響應頭中包含訪問控制允許來源:* –