Blame view

protected/components/HttpRequest.php 294 Bytes
a1684257   Administrator   first commit
1
2
3
4
5
6
7
8
9
10
11
  <?php
  
  class HttpRequest extends CHttpRequest
  {
      public function validateCsrfToken($event)
      {
          $contentType = isset($_SERVER["CONTENT_TYPE"]) ? $_SERVER["CONTENT_TYPE"] : null;
          if ($contentType !== 'application/json')
              parent::validateCsrfToken($event);
      }
  }