正在显示
1 个修改的文件
包含
6 行增加
和
1 行删除
1 | <?php | 1 | <?php |
2 | - | 2 | +header("Access-Control-Allow-Origin: * "); |
3 | +header("Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, DELETE"); | ||
4 | +if($_SERVER['REQUEST_METHOD'] == 'OPTIONS') { | ||
5 | + header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Authorization"); | ||
6 | + exit; | ||
7 | +} | ||
3 | // +---------------------------------------------------------------------- | 8 | // +---------------------------------------------------------------------- |
4 | // | ThinkPHP [ WE CAN DO IT JUST THINK ] | 9 | // | ThinkPHP [ WE CAN DO IT JUST THINK ] |
5 | // +---------------------------------------------------------------------- | 10 | // +---------------------------------------------------------------------- |
-
请 注册 或 登录 后发表评论