ブラウザでローカルに実行すると、プロキシ設定が機能します。
次を使用してデバイスで実行すると:
ionic cordova run android --device --livereload
エラーが発生します:
Failed to load http://localhost:5984/mobilehosstest:
Response to preflight request doesn't pass access control check:
No 'Access-Control-Allow-Origin' header is present on the requested resource.
Origin 'http://172.22.4.13:8100' is therefore not allowed access.
The response had HTTP status code 401.
問題は、なぜ からロードしようとしているのかということですlocalhost:5984
。localhost:8100
またはからロードしている場合http://172.22.4.13:8100
、プロキシはブラウザで動作するように動作します。
livereload サーバーと関係がありますが、設定方法がわかりません。