Adding support for crossdomain middleware

Notes: 
 - only one domain policy supported
 - secure value is not configured
Good idea.