You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2021/05/07 01:07:09 UTC

[GitHub] [cordova-plugin-whitelist] cyclonmaster opened a new issue #60: Network Request Whitelist access origin="*" still block any ajax request

cyclonmaster opened a new issue #60:
URL: https://github.com/apache/cordova-plugin-whitelist/issues/60


   # Bug Report
   Network Request Whitelist to aloow any requests did not work
   
   ## Problem
   error:
   Access to XMLHttpRequest at 'https://xxx' from origin 'http://localhost:8080' 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.
   
   ### What is expected to happen?
   
   It suppose to allowed ajax request to https://xxx
   
   ### What does actually happen?
   
   ajax request to https://xxx was blocked by cors policy
   
   ## Information
   <!-- Include all relevant information that might help understand and reproduce the problem -->
   
   
   
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
   
   
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you experiencing the issue? -->
   
   Device: Redmi Note 9S, Android 10
   
   ### Version information
   <!-- 
   What are relevant versions you are using?
   For example:
   Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins 
   Other Frameworks: Ionic Framework and CLI version
   Operating System, Android Studio, Xcode etc.
   -->
   
   Cordova Android platform version 9.1.0
   cordova-plugin-whitelist Version 1.3.4
   Webview Version 90.0.4430.91
   
   config.xml
   <access origin="*" />
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [ x] I searched for existing GitHub issues
   - [ x] I updated all Cordova tooling to most recent version
   - [ x] I included all the necessary information above
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-whitelist] freescout-helpdesk commented on issue #60: Network Request Whitelist access origin="*" still block any ajax request

Posted by GitBox <gi...@apache.org>.
freescout-helpdesk commented on issue #60:
URL: https://github.com/apache/cordova-plugin-whitelist/issues/60#issuecomment-903573254


   > It does looks like cordova-android does not need "Access-Control-Allow-Origin *" header on the server, while cordova-ios needs.
   
   Cordova community on Slack confirmed this.
   
   It would be good to have this mentioned on https://github.com/apache/cordova-plugin-whitelist homepage for example. As it is not mentioned on any Cordova resources and developers will continue to spend hours and days trying to figure out why their Cordova apps are able to send ajax requests to any external addresses on Android, but unable on iOS.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-whitelist] breautek closed issue #60: Network Request Whitelist access origin="*" still block any ajax request

Posted by GitBox <gi...@apache.org>.
breautek closed issue #60:
URL: https://github.com/apache/cordova-plugin-whitelist/issues/60


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-whitelist] breautek commented on issue #60: Network Request Whitelist access origin="*" still block any ajax request

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #60:
URL: https://github.com/apache/cordova-plugin-whitelist/issues/60#issuecomment-833990157


   CORS is a webview feature that isn't overridable. The whitelist plugin does not control this access feature.
   
   The server needs to be configured to send the appropriate headers for CORS enabled webview/browsers.
   
   You can find more information on this at:
   
   https://breautek.com/articles/enabling-cors.html (article is focused around iOS WkWebView but the same applies for android webviews as well)
   
   https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
   
   If you need further assistance, I'll invite you to our [Slack](http://slack.cordova.io/) community.
   
   Closing this as not a bug / wont fix.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-whitelist] erisu commented on issue #60: Network Request Whitelist access origin="*" still block any ajax request

Posted by GitBox <gi...@apache.org>.
erisu commented on issue #60:
URL: https://github.com/apache/cordova-plugin-whitelist/issues/60#issuecomment-903711008


   This plugin has been deprecated, will be archived shortly, and most likely will not be accepting changes/PR to this repo.
   
   I recommend that you open an issue ticket to fix the **Allow List** documentation in the `cordova-docs` repo.
   
   We also welcome contributions/PRs if you like the help out and have time to spare. Again make sure it is on the `cordova-docs` repos.
   
   The changes should be in this file: https://github.com/apache/cordova-docs/blob/master/www/docs/en/dev/guide/appdev/allowlist/index.md


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-whitelist] freescout-helpdesk commented on issue #60: Network Request Whitelist access origin="*" still block any ajax request

Posted by GitBox <gi...@apache.org>.
freescout-helpdesk commented on issue #60:
URL: https://github.com/apache/cordova-plugin-whitelist/issues/60#issuecomment-903485597


   It does looks like cordova-android does not need "Access-Control-Allow-Origin *" header on the server, while cordova-ios needs.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-whitelist] breautek commented on issue #60: Network Request Whitelist access origin="*" still block any ajax request

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #60:
URL: https://github.com/apache/cordova-plugin-whitelist/issues/60#issuecomment-834030805


   Use the slack link for invite (its open to anyone)
   
   http://slack.cordova.io/
   
   I'm not familiar with Firebase but you may require a proxy server.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-whitelist] erisu edited a comment on issue #60: Network Request Whitelist access origin="*" still block any ajax request

Posted by GitBox <gi...@apache.org>.
erisu edited a comment on issue #60:
URL: https://github.com/apache/cordova-plugin-whitelist/issues/60#issuecomment-903711008


   This plugin has been deprecated, will be archived shortly, and most likely will not be accepting any changes (PRs) to this repo.
   
   I recommend that you open an issue ticket to fix the **Allow List** documentation in the `cordova-docs` repo.
   
   We also welcome contributions/PRs if you like the help out and have time to spare. Again make sure it is on the `cordova-docs` repos.
   
   The changes should be in this file: https://github.com/apache/cordova-docs/blob/master/www/docs/en/dev/guide/appdev/allowlist/index.md


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-whitelist] cyclonmaster commented on issue #60: Network Request Whitelist access origin="*" still block any ajax request

Posted by GitBox <gi...@apache.org>.
cyclonmaster commented on issue #60:
URL: https://github.com/apache/cordova-plugin-whitelist/issues/60#issuecomment-833995186


   > CORS is a webview feature that isn't overridable. The whitelist plugin does not control this access feature.
   > 
   > The server needs to be configured to send the appropriate headers for CORS enabled webview/browsers.
   > 
   > You can find more information on this at:
   > 
   > https://breautek.com/articles/enabling-cors.html (article is focused around iOS WkWebView but the same applies for android webviews as well)
   > 
   > https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
   > 
   > If you need further assistance, I'll invite you to our [Slack](http://slack.cordova.io/) community.
   > 
   > Closing this as not a bug / wont fix.
   
   yes, please. invite me to slack.
   I use firebase, and sometime a simple json file I store in github which not actually a server based. I cannot configured cors setting at the server. previously it work, only now it don't.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-whitelist] freescout-helpdesk commented on issue #60: Network Request Whitelist access origin="*" still block any ajax request

Posted by GitBox <gi...@apache.org>.
freescout-helpdesk commented on issue #60:
URL: https://github.com/apache/cordova-plugin-whitelist/issues/60#issuecomment-903318376


   On Android with the following in `config.xml` we are able to perform ajax requests to any servers and URLs:
   ```
   <access origin="*" />
   <plugin name="cordova-plugin-whitelist" spec="1.3.4" />
   <engine name="android" spec="^8.1.0" />
   ```
   
   But now we are building **exactly** the same app for iOS, but ajax requests do not work (checked on iPhone, iOS 12.4.0):
   ```
   <access origin="*" />
   <plugin name="cordova-plugin-whitelist" spec="1.3.4" />
   <engine name="cordova-ios" spec="5.1.1" />
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org