Forcing json content type, adding cross origin headers.