mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 09:39:10 +08:00
update: add etag
This commit is contained in:
parent
d76c2b3bca
commit
fc2b4bd422
@ -55,10 +55,14 @@ class DeepbworkController extends Controller
|
||||
unset($user['email']);
|
||||
array_push($result, $user);
|
||||
}
|
||||
$eTag = sha1(json_encode($result));
|
||||
if ($eTag === $request->header("IF-NONE-MATCH")) {
|
||||
abort(304);
|
||||
}
|
||||
return response([
|
||||
'msg' => 'ok',
|
||||
'data' => $result,
|
||||
]);
|
||||
])->header('ETag', $eTag);
|
||||
}
|
||||
|
||||
// 后端提交数据
|
||||
|
@ -48,9 +48,13 @@ class ShadowsocksTidalabController extends Controller
|
||||
'secret' => $user->uuid
|
||||
]);
|
||||
}
|
||||
$eTag = sha1(json_encode($result));
|
||||
if ($eTag === $request->header("IF-NONE-MATCH")) {
|
||||
abort(304);
|
||||
}
|
||||
return response([
|
||||
'data' => $result
|
||||
]);
|
||||
])->header('ETag', $eTag);
|
||||
}
|
||||
|
||||
// 后端提交数据
|
||||
|
@ -52,10 +52,14 @@ class TrojanTidalabController extends Controller
|
||||
unset($user['email']);
|
||||
array_push($result, $user);
|
||||
}
|
||||
$eTag = sha1(json_encode($result));
|
||||
if ($eTag === $request->header("IF-NONE-MATCH")) {
|
||||
abort(304);
|
||||
}
|
||||
return response([
|
||||
'msg' => 'ok',
|
||||
'data' => $result,
|
||||
]);
|
||||
])->header('ETag', $eTag);
|
||||
}
|
||||
|
||||
// 后端提交数据
|
||||
|
Loading…
Reference in New Issue
Block a user