Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

axios issues #11

Open
donmb1 opened this issue Sep 8, 2020 · 1 comment
Open

axios issues #11

donmb1 opened this issue Sep 8, 2020 · 1 comment

Comments

@donmb1
Copy link

donmb1 commented Sep 8, 2020

For some reasons I face axios / http request issues with this configuration and I don't understand why. Requests are just not going out.
This only happens on Android, not on ios and not in browser.

I understood that we have to set permissions like so in config.xml in the cordova folder

<edit-file mode="merge" parent="/manifest/uses-permission" target="AndroidManifest.xml">
  <uses-permission android:name="android.permission.INTERNET" />
  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</edit-file>

what we can also do in nuxt is setting some "Content-Security-Policy" like so:

meta: [
      { charset: 'utf-8' },
      { "http-equiv": "Content-Security-Policy", content: "default-src * 'unsafe-inline' 'unsafe-eval'; script-src * 'unsafe-inline' 'unsafe-eval'; connect-src * 'unsafe-inline'; img-src * data: blob: 'unsafe-inline'; frame-src *; style-src * 'unsafe-inline';" },

all this does not help: There are no axios requests happening.

Maybe something recently changed in Android user permissions which does prevent this to work?

@J4si3k
Copy link

J4si3k commented Nov 15, 2020

i also have problem with axios. Request try to go for e.g.

GET file:///api/posts net::ERR_FILE_NOT_FOUND

so to file: not to http:. Where is the problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants