0

The title pretty much says it all. I know I can bypass it in my browser with --disable-web-security (for chrome) but how does it work for releasing the app? I have no access to the server that is set to deny reverse proxies and only accepts GET requests not OPTIONS this leads to prefight issues. How can I work around this?

I've taken a look at these but they don't seem to answer the prefight from release workaround. Any Suggestions/workarounds?

http://blog.ionic.io/handling-cors-issues-in-ionic/

https://blog.nraboy.com/2014/08/bypass-cors-errors-testing-apis-locally/

4

2 に答える 2

0
  • Chrome cors 拡張機能をダウンロード
  • サービスからポスト コールを呼び出さないでください。コントローラから呼び出します。
  • サーバー側で、利用可能なすべてのルートのオプションルートがあることを確認してください
  • このような投稿リクエストを実行します

    $http->post('you api', your_data) .success(function(response) { ..}).error(function (error) {..})

.finally(function() {..});

  • サーバーがlaravelで実行されている場合は、palanik/lumencorsも入手してください
于 2016-09-23T19:10:46.990 に答える