Skip to content

Instantly share code, notes, and snippets.

@binnng
Created December 10, 2013 06:16
Show Gist options
  • Save binnng/7886442 to your computer and use it in GitHub Desktop.
Save binnng/7886442 to your computer and use it in GitHub Desktop.
通过设置响应头解决跨域问题
Access-Control-Allow-Origin: http://foo.example
允许跨域的域
Access-Control-Allow-Methods: POST, GET, OPTIONS
允许跨域执行的方法
Access-Control-Allow-Headers: X-PINGOTHER
允许跨域设置的头信息
Access-Control-Max-Age: 1728000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment