File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
dockerfiles/services/request-replayer/src Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,15 @@ function logRequest($message, $data = '')
163163 case '/v0.7/config ' :
164164 $ request = file_get_contents ('php://input ' );
165165 logRequest ("Requested remote config " , $ request );
166+
167+ if (file_exists (REQUEST_LATEST_DUMP_FILE )) {
168+ $ tracesStack = json_decode (file_get_contents (REQUEST_LATEST_DUMP_FILE ), true );
169+ } else {
170+ $ tracesStack = [];
171+ }
172+ $ tracesStack [] = ['uri ' => $ _SERVER ['REQUEST_URI ' ], 'headers ' => getallheaders (), 'body ' => $ request ];
173+ file_put_contents (REQUEST_LATEST_DUMP_FILE , json_encode ($ tracesStack ));
174+
166175 $ request = json_decode ($ request , true );
167176 $ recentUpdate = @filemtime (REQUEST_RC_CONFIGS_FILE ) > time () - 2 ;
168177 $ response = [
You can’t perform that action at this time.
0 commit comments