回答編集履歴
2
コードの修正
test
CHANGED
@@ -16,11 +16,11 @@
|
|
16
16
|
|
17
17
|
{
|
18
18
|
|
19
|
-
$json
|
19
|
+
$json = (string)$response;
|
20
20
|
|
21
|
-
$
|
21
|
+
$array = json_decode($json, true);
|
22
22
|
|
23
|
-
$res = ")]}'," . json_encode($
|
23
|
+
$res = ")]}'," . json_encode($array[1]);
|
24
24
|
|
25
25
|
return \Response::forge($res);
|
26
26
|
|
1
不要データを除去
test
CHANGED
@@ -16,9 +16,13 @@
|
|
16
16
|
|
17
17
|
{
|
18
18
|
|
19
|
-
$r
|
19
|
+
$json_string = (string)$response;
|
20
20
|
|
21
|
+
$json = json_decode($json_string, true);
|
22
|
+
|
23
|
+
$res = ")]}'," . json_encode($json[1]);
|
24
|
+
|
21
|
-
return Response::forge($res);
|
25
|
+
return \Response::forge($res);
|
22
26
|
|
23
27
|
}
|
24
28
|
|
@@ -28,6 +32,6 @@
|
|
28
32
|
|
29
33
|
再度Responseオブジェクトに詰めて返すで出来ました。
|
30
34
|
|
31
|
-
Controller_Restのafterを無視してい
|
35
|
+
Controller_Restのafterを無視していますが、JSON Vulnerability Protectionを
|
32
36
|
|
33
|
-
|
37
|
+
確認するため一時的になら問題ないかと。
|