I've just started using Web App Builder and have been following the instructions to create a custom widget here: Create a custom in-panel widget—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers
When I first attempted to test the widget via this URL: http://[your host name:3344]/webapp/?config=config-demo.json I got a Access-Control-Allow-Origin error. I then set this header on the server and made its value "*". I then attempted to test the widget again and received this error: "Unable to load http://<webserver>/arcgis/sharing/portals/self?f=json&dojo.preventCache=1425517676066 status: 401".
Is anyone able to help me resolve this please?