setcsrfheader(xhr)

This is for securing form to be valid when sending data to DG3 server.