added support for trusted domains