Daniel-KM / Omeka-plugin-UniversalViewer

Plugin for Omeka that adds the IIIF specifications in order to act like an IIPImage server, and the UniversalViewer, a unified online player for any file. It can display books, images, maps, audio, movies, pdf, 3D views, and anything else as long as the appropriate extensions are installed.
Other
24 stars 20 forks source link

Mixed Content Error for uv config.json #59

Closed edsilv closed 2 years ago

edsilv commented 2 years ago

Hi,

We're getting a mixed content error for /plugins/UniversalViewer/views/public/universal-viewer/config.json (it's being served as http:// within a https:// site).

This appears to be where the config.json path is being set:

https://github.com/Daniel-KM/Omeka-plugin-UniversalViewer/blob/5f0e5b4156f9a933d1d3daf63054f736a6b21e3c/views/shared/common/helper/universal-viewer.php#L18

I've looked through the Omeka admin interface (v 2.4.1) and found Force https, but this hasn't helped.

What do I need to change in order to force the config.json to load over https?

Many thanks!

edsilv commented 2 years ago

No worries, I just hard-coded the config url in /var/www/plugins/UniversalViewer/views/helpers/UniversalViewer.php:

$config = 'https://my-site.com/plugins/UniversalViewer/views/public/universal-viewer/config.json';
$urlJs = src('embed', 'javascripts/uv/lib', 'js');

$html = sprintf('<div class="uv%s" data-config="%s" data-uri="%s"%s%s></div>',
    $class,
    $config,
    $urlManifest,
    $locale,
    $style);