fixed #1312, #972, add cors support
Merge pull request #1313 from hotoo/feature-crossorigin

fixed #1312, #972, add cors support