private function addCommonHeader($isOption = false) {
        $headers = $this->getResponse()->getHeaders();
        $headers->addHeaderLine('Tus-Resumable', self::TUS_VERSION);
        $headers->addHeaderLine('Access-Control-Allow-Origin', '*');
        $headers->addHeaderLine('Access-Control-Expose-Headers', 'Upload-Offset, Location, Upload-Length, Tus-Version, Tus-Resumable, Tus-Max-Size, Tus-Extension, Upload-Metadata');

        if ($isOption) {
            $allowedMethods = 'OPTIONS,HEAD,POST,PATCH';
            if ($this->getAllowGetMethod()) {
                $allowedMethods .= ',GET';
            }

            $headers->addHeaders([
                'Tus-Version' => self::TUS_VERSION,
                'Tus-Extension' => 'creation',
                'Tus-Max-Size' => $this->allowMaxSize,
                'Allow' => $allowedMethods,
                'Access-Control-Allow-Methods' => $allowedMethods,
                'Access-Control-Allow-Headers' => 'Origin, X-Requested-With, Content-Type, Accept, Final-Length, Upload-Offset, Upload-Length, Tus-Resumable, Upload-Metadata',
            ]);
        }
        return $this->response->setHeaders($headers);
    }