作者 lyh

gx

@@ -4,7 +4,6 @@ namespace App\Http\Controllers\File; @@ -4,7 +4,6 @@ namespace App\Http\Controllers\File;
4 4
5 use App\Enums\Common\Code; 5 use App\Enums\Common\Code;
6 use App\Models\File\File; 6 use App\Models\File\File;
7 -use App\Models\File\Image as ImageModel;  
8 use App\Models\Project\Project; 7 use App\Models\Project\Project;
9 use App\Services\CosService; 8 use App\Services\CosService;
10 use Illuminate\Http\Exceptions\HttpResponseException; 9 use Illuminate\Http\Exceptions\HttpResponseException;
@@ -52,18 +52,6 @@ class ImageController extends Controller @@ -52,18 +52,6 @@ class ImageController extends Controller
52 52
53 public function __construct() 53 public function __construct()
54 { 54 {
55 - $http_origin = "*";  
56 - if(isset($_SERVER['HTTP_ORIGIN'])){  
57 - $http_origin = $_SERVER['HTTP_ORIGIN'];  
58 - }  
59 - header("Access-Control-Allow-Origin:".$http_origin);  
60 - header('Access-Control-Allow-Methods:POST,GET'); //支持的http 动作  
61 - header('Access-Control-Allow-Credentials: true');  
62 - header('Access-Control-Max-Age: 1000');  
63 - header('Access-Control-Allow-Headers:Origin, X-Requested-With, Content-Type, Accept, Authorization, token'); //响应头 请按照自己需求添加。  
64 - if (strtolower($_SERVER['REQUEST_METHOD']) == 'options') {  
65 - exit;  
66 - }  
67 $this->request = request(); 55 $this->request = request();
68 $this->token = $this->request->header('token'); 56 $this->token = $this->request->header('token');
69 $this->cache = Cache::get($this->token); 57 $this->cache = Cache::get($this->token);