Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion admin/class-rtgodam-transcoder-handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -461,9 +461,20 @@ public function wp_media_transcoding( $wp_metadata, $attachment_id, $autoformat
}
}

/**
* Filters whether requests to the GoDAM transcoding API verify the
* server's TLS certificate. Turn it off only for a local or staging
* API that uses a self-signed certificate.
*
* @since n.e.x.t
*
* @param bool $verify_ssl Whether to verify the certificate. Default true.
*/
$verify_ssl = (bool) apply_filters( 'godam_transcoder_verify_ssl', true );

$args = array(
'method' => empty( $transcoding_job_id ) ? 'POST' : 'PUT',
'sslverify' => false,
'sslverify' => $verify_ssl,
'timeout' => 60, // phpcs:ignore WordPressVIPMinimum.Performance.RemoteRequestTimeout.timeout_timeout
'body' => array_merge(
array(
Expand Down
5 changes: 4 additions & 1 deletion inc/helpers/custom-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1754,12 +1754,15 @@ function rtgodam_send_video_to_godam_for_transcoding( $form_type = '', $form_tit
$watermark_to_use
);

/** This filter is documented in admin/class-rtgodam-transcoder-handler.php */
$verify_ssl = (bool) apply_filters( 'godam_transcoder_verify_ssl', true );

/**
* Prepare the args to pass to request.
*/
$args = array(
'method' => 'POST',
'sslverify' => false,
'sslverify' => $verify_ssl,
'timeout' => 60, // phpcs:ignore WordPressVIPMinimum.Performance.RemoteRequestTimeout.timeout_timeout
'body' => $body,
);
Expand Down
Loading