Skip to content

Commit b129fa0

Browse files
author
Marco Pereirinha
committed
Ensure that CNAME accounts can deliver the Cloudinary Gallery
1 parent 9515ee4 commit b129fa0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

php/media/class-gallery.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,13 @@ public function get_config() {
131131
*/
132132
$config['container'] = apply_filters( 'cloudinary_gallery_html_container', '' );
133133

134+
$credentials = $this->plugin->components['connect']->get_credentials();
135+
136+
if ( ! empty( $credentials['cname'] ) ) {
137+
$config['secureDistribution'] = $credentials['cname'];
138+
$config['privateCdn'] = true;
139+
}
140+
134141
/**
135142
* Filter the gallery configuration.
136143
*

0 commit comments

Comments
 (0)