跨域

    -- 浏览器的同源策略 阻止ajax请求 不阻止src请求
-- jsonp
-- 我们利用src发送请求
-- core
-- class MyCore(MiddlewareMixin):
def process_response(self, request, response):
response['Access-Control-Allow-Origin'] = "*"
if request.method == "OPTIONS":
# 复杂请求 预检
response['Access-Control-Allow-Headers'] = "Content-Type"
response['Access-Control-Allow-Methods'] = "POST, DELETE, PUT"
return response

最新文章

  1. Palindrome Pairs
  2. rename 快速移动文件或者文件夹
  3. html5网页动画总结--jQuery旋转插件jqueryrotate
  4. A*算法详解 BZOJ 1085骑士精神
  5. HTML5程序设计--SVG
  6. h2database源码浅析:事务、两阶段提交
  7. Android应用开发学习之画廊视图
  8. MYSQL id 自动加1
  9. 混入模式(max-in)实现继承
  10. Python学习之编写登陆接口(Day1,作业一)
  11. LeetCode OJ 35. Search Insert Position
  12. DNA序列对齐问题
  13. TP 3.2.3 接入PHPMailer
  14. CSS布局(四) float详解
  15. 基于androidpn客户端修改的AndroidPNClient
  16. restTemplate设置访问超时
  17. Percona-Toolkit 之 pt-online-schema-change 总结
  18. vue-router2.x使用入门
  19. html学习_html5 新增标签和属性
  20. 如何借助 HealthKit 打造一款健身应用?

热门文章

  1. MogileFS与spring结合
  2. Codefroces 1245 F. Daniel and Spring Cleaning
  3. MH-P虚拟机DSR中安装SQL2008
  4. tiny-Spring【1】
  5. 伪元素before和after本质
  6. spring 实现事务配置的方式
  7. [转]Spring Security Oauth2 认证流程
  8. vue——store全局存储
  9. 用mybatis将SQL查询语句”select * from user”的封装为配置文件
  10. Axure工作区间