src/Controller/DocsController.php
protected function addCorsHeaders()
    {
        // set CORS headers if specified in config
        if (!isset($this->config['docs']['cors'])) {
            return false;
        }

        if (!count($this->config['docs']['cors'])) {
            return false;
        }

        foreach ($this->config['docs']['cors'] as $header => $value) {
            $this->response = $this->response->withHeader($header, $value);
        }
    }
protected function addCorsHeaders()
    {
        // set CORS headers if specified in config
        if (!isset($this->config['docs']['cors'])) {
            return false;
        }

        if (!count($this->config['docs']['cors'])) {
            return false;
        }

        foreach ($this->config['docs']['cors'] as $header => $value) {
            $this->response = $this->response->withHeader($header, $value);
        }
    }
protected function addCorsHeaders ( ) { // set CORS headers if specified in config if ( ! isset ( $ this -> config [ 'docs' ] [ 'cors' ] ) ) { return false ; } if ( ! count ( $ this -> config [ 'docs' ] [ 'cors' ] ) ) { return false ; } foreach ( $ this -> config [ 'docs' ] [ 'cors' ] as $ header => $ value ) { $ this -> response = $ this -> response -> withHeader ( $ header , $ value ) ; } }
Set CORS headers if found in configuration.

@return bool|void
Set CORS headers if found in configuration .