Skip to content

Commit d19dc77

Browse files
yuyaunchriskacerguis
authored andcommitted
fix cross site to option request error (chriskacerguis#720)
cross site request first can use option http method. but use `keys` authentication, authentication can fail
1 parent 053ab87 commit d19dc77

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

application/libraries/REST_Controller.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,11 @@ public function _remap($object_called, $arguments = [])
650650
{
651651
$this->_log_request();
652652
}
653+
654+
// fix cross site to option request error
655+
if($this->request->method == 'options') {
656+
exit;
657+
}
653658

654659
$this->response([
655660
$this->config->item('rest_status_field_name') => FALSE,

0 commit comments

Comments
 (0)