Updating for cors support.
Adding cors to device resources.
Cors setup.
cors setup
Added in event handlers.