only set headers if origin
Merge pull request #1 from Raynos/if-corsify

only set headers if origin