mirror of
				https://github.com/v2board/v2board.git
				synced 2025-11-01 01:41:47 +08:00 
			
		
		
		
	update: support cf etag
This commit is contained in:
		| @@ -56,13 +56,13 @@ class DeepbworkController extends Controller | ||||
|             array_push($result, $user); | ||||
|         } | ||||
|         $eTag = sha1(json_encode($result)); | ||||
|         if ($eTag === $request->header("IF-NONE-MATCH")) { | ||||
|         if (strpos($request->header('If-None-Match'), $eTag) !== false ) { | ||||
|             abort(304); | ||||
|         } | ||||
|         return response([ | ||||
|             'msg' => 'ok', | ||||
|             'data' => $result, | ||||
|         ])->header('ETag', $eTag); | ||||
|         ])->header('ETag', "\"{$eTag}\""); | ||||
|     } | ||||
|  | ||||
|     // 后端提交数据 | ||||
|   | ||||
| @@ -49,12 +49,12 @@ class ShadowsocksTidalabController extends Controller | ||||
|             ]); | ||||
|         } | ||||
|         $eTag = sha1(json_encode($result)); | ||||
|         if ($eTag === $request->header("IF-NONE-MATCH")) { | ||||
|         if (strpos($request->header('If-None-Match'), $eTag) !== false ) { | ||||
|             abort(304); | ||||
|         } | ||||
|         return response([ | ||||
|             'data' => $result | ||||
|         ])->header('ETag', $eTag); | ||||
|         ])->header('ETag', "\"{$eTag}\""); | ||||
|     } | ||||
|  | ||||
|     // 后端提交数据 | ||||
|   | ||||
| @@ -53,13 +53,13 @@ class TrojanTidalabController extends Controller | ||||
|             array_push($result, $user); | ||||
|         } | ||||
|         $eTag = sha1(json_encode($result)); | ||||
|         if ($eTag === $request->header("IF-NONE-MATCH")) { | ||||
|         if (strpos($request->header('If-None-Match'), $eTag) !== false ) { | ||||
|             abort(304); | ||||
|         } | ||||
|         return response([ | ||||
|             'msg' => 'ok', | ||||
|             'data' => $result, | ||||
|         ])->header('ETag', $eTag); | ||||
|         ])->header('ETag', "\"{$eTag}\""); | ||||
|     } | ||||
|  | ||||
|     // 后端提交数据 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user