support http and xhr polling in cors