The ENV viarable that is exported in app/config/environment.js is saved as JSON in <meta> tag in index.html. In order to properly set the settings from the app we need to get it from there, update the JSON and write it back