You are here

protected function UploaderServlet::addHeaders in N1ED - Visual editor as CKEditor plugin with Bootstrap support 7

2 calls to UploaderServlet::addHeaders()
UploaderServlet::doOptions in vendor/edsdk/file-uploader-server-php/src/servlet/UploaderServlet.php
UploaderServlet::doPost in vendor/edsdk/file-uploader-server-php/src/servlet/UploaderServlet.php

File

vendor/edsdk/file-uploader-server-php/src/servlet/UploaderServlet.php, line 72

Class

UploaderServlet

Namespace

EdSDK\FileUploaderServer\servlet

Code

protected function addHeaders() {
  if ($this->m_config
    ->getCrossDomainUrl() != null && strlen($this->m_config
    ->getCrossDomainUrl()) > 0) {
    header("Access-Control-Allow-Origin: " . $this->m_config
      ->getCrossDomainUrl());
    header("Access-Control-Allow-Methods: POST");
    header("Access-Control-Allow-Headers: accept, content-type");
    header("Access-Control-Max-Age: 1728000");
  }
}