songxingwei 2 yıl önce
ebeveyn
işleme
ed80655aa4
1 değiştirilmiş dosya ile 9 ekleme ve 0 silme
  1. 9 0
      public/index.php

+ 9 - 0
public/index.php

@@ -18,4 +18,13 @@ namespace think;
 
 require __DIR__ . '/../thinkphp/base.php';
 
+
+//跨域请求设置
+
+header('Access-Control-Allow-Origin:*');
+header('Access-Control-Allow-Credentials:true');
+header('Access-Control-Allow-Methods:GET,POST,PUT,OPTIONS,PATCH,DELETE,HEAD');
+
+header('Access-Control-Allow-Headers:Origin,X-Requested-With, Content-Type, Accept, x-access-sign, x-access-time, uid,Access-Control-Allow-Credentials,Access-Token,access-token,token,access-control-allow-origin,Token,Access-Control-Allow-Origin,Content-Type,Referer,User-Agent');
+
 Container::get('app')->run()->send();