未解決のクロスドメインの問題のCORSレコード

フロントアクセスバックエンドサーバのHDFSは、次のように与えられた問題を作成したクロスドメインファイルを生成する場合:

Access to fetch at 'http://localhost:8087/api/hdfs/httpfs/Cluster%201/user/1111?op=CREATE&data=true&user.name=****' (redirected from 'http://localhost:8000/api/hdfs/httpfs/Cluster%201/user/1111?op=CREATE') from origin 'http://localhost:8000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

オンラインメソッドセット@CrossOriginとヘッダーによると:

      response.setHeader("Access-Control-Allow-Credentials", "true");
      response.setHeader("Access-Control-Allow-Origin", "*");    ------*与具体IP均尝试过
      response.setHeader("Access-Control-Allow-Methods", "PUT, GET, POST, DELETE, OPTIONS");
      response.setHeader("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, Authorization, Access-Control-Allow-Credentials");
      response.setHeader("Access-Control-Allow-Credentials", "true");

まだ発効し、この問題の解決策がない、それを記録し、そうして更新がノートを解決

おすすめ

転載: www.cnblogs.com/frogfrog/p/11362196.html