Is config.json overwritten on project switch?

I set up a web project’s config.json with an array in CORS to allow multiple app:// hostnames to connect to it. This works well but every time I switch projects, the settings in that config.json file seem to get overwritten so that the cors value reverts back to capacitor://localhost

Is this the intended behaviour? If so, can it be changed?

@mebeingken, I know you have a similar set up. Have you noticed this?

Server connect options are stored per target and copied to the main on project switch or target change.

So make sure you have the eiseres target active when editing those options.

Because I need to enter an array, I have to edit the config.json file directly - changing the option in the SC settings converts it to a string.

Then you the to edit the target specific config, stored in:

.wappler/targets/target_name/app/config/config.json

1 Like

I do as George describes and have not had any issues when switching projects.

1 Like

Thanks both - I was changing it in the wrong place (in the app folder rather than .wappler :man_facepalming:)

Appreciate the quick response :+1: