File tree Expand file tree Collapse file tree 1 file changed +2
-13
lines changed
Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -61,11 +61,11 @@ protected function script( $req ) {
6161
6262 if ( !empty ( $ req ->query ['callback ' ] ) ) {
6363 $ headers = array_combine (
64- array_map ( 'strtolower ' , array_keys ( $ req ->headers ) ),
64+ array_map ( 'strtolower ' , array_keys ( $ req ->headers ) ),
6565 array_values ( $ req ->headers )
6666 );
6767
68- echo "{$ req ->query ['callback ' ]}( " . json_encode ( $ req ->headers ) . ") " ;
68+ echo "{$ req ->query ['callback ' ]}( " . json_encode ( $ req ->headers ) . ") " ;
6969 } else {
7070 echo 'QUnit.assert.ok( true, "mock executed" ); ' ;
7171 }
@@ -249,17 +249,6 @@ protected function errorWithScript( $req ) {
249249 }
250250 }
251251
252- protected function cors ( $ req ) {
253- if ( isset ( $ req ->headers ['ORIGIN ' ] ) ) {
254- $ origin = $ req ->headers ['ORIGIN ' ];
255- header ( "Access-Control-Allow-Methods: GET " );
256- header ( "Access-Control-Allow-Origin: " . $ origin );
257- echo 'corsCallback( true ) ' ;
258- } else {
259- echo 'corsCallback( false ) ' ;
260- }
261- }
262-
263252 public function __construct () {
264253 $ this ->cspFile = __DIR__ . '/support/csp.log ' ;
265254 }
You can’t perform that action at this time.
0 commit comments