def after_request(response):
response.headers.add("Access-Control-Allow-Origin", "*")
response.headers.add("Access-Control-Allow-Methods", "GET, POST, PUT, PATCH, DELETE, OPTIONS")
response.headers.add('Access-Control-Allow-Headers', 'X-Requested-With, Content-Type, Authorization')
response.headers.add('Access-Control-Allow-Credentials', 'true')
response.headers.add('Content-Type', 'application/json')
return response
评论列表
文章目录