cordova-docs icon indicating copy to clipboard operation
cordova-docs copied to clipboard

Cordova command create apps by default do not include <access origin="*">?

Open whilename opened this issue 2 years ago • 2 comments

Bug Report

Problem

In NodeJs v18 & [email protected] environment, after I created a project using "cordova create sampleapp com.sample.app SampleApp" command, "config.xml" file is not included , causing the program to be unable to access external web-sites.

What is expected to happen?

I tried to create the project in cordova@9 version, "config.xml" file and it will contain by default, I saw in the official cordova documentation guide(https://cordova.apache.org/docs/en/11.x/guide/appdev/allowlist/index.html#network-request-allow-list) that it is automatically added by default.

What does actually happen?

so I was wondering why is not included by default in cordova@11.* version?

Command or Code

cordova create sampleapp com.sampleapp.com SampleApp cordova platform add android cordova plugin add cordova-plugin-dialogs cordova-plugin-network-information

Environment, Platform, Device

Windows 11 & NodeJS v18 & [email protected] & Android

Checklist

  • [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

whilename avatar Jun 29 '23 02:06 whilename

Defaulting to allow access to all origins poses a risk. It was decided to be removed as a default.

It is recommended that developers understand and configure what should be accessible.

It appears the docs were not updated.

erisu avatar Jun 29 '23 08:06 erisu

Moving this to the cordova-docs repo because I think we should treat this as a doc bug.

breautek avatar Oct 21 '23 11:10 breautek