OHIF Plug-in Question: app-config.js blocked due to MIME type

Happy New Year !!

Off the forum for a bit. I just updated some packages and tried setting up the OHIF plug-in. I presume I have a minor config issue. I am seeing this error though when trying to view a study.

(http://localhost:8042/ohif/app-config.js)” was blocked due to MIME type (“application/json”) mismatch (X-Content-Type-Options: nosniff)

The file does open in the broswer directly:


SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data


window.config = {
  extensions: [],
  modes: []
}
/**
 * SPDX-FileCopyrightText: 2023 Sebastien Jodogne, UCLouvain, Belgium,
 * and 2018-2023 Open Health Imaging Foundation
 * SPDX-License-Identifier: MIT
 */

window.config.routerBasename = '/ohif/';

if (false) {
  window.config.dataSources = [
    {
      friendlyName: 'Orthanc DICOMweb',
      namespace: '@ohif/extension-default.dataSourcesModule.dicomweb',
      sourceName: 'dicomweb',
      configuration: {
        name: 'orthanc',

        wadoUriRoot: '../dicom-web',
        qidoRoot: '../dicom-web',
        wadoRoot: '../dicom-web',
        
        qidoSupportsIncludeField: false,
        supportsReject: false,
        imageRendering: 'wadors',
        thumbnailRendering: 'wadors',
        enableStudyLazyLoad: true,
        supportsFuzzyMatching: false,
        supportsWildcard: true,
        staticWado: true,
        singlepart: 'bulkdata,pdf,video',
        acceptHeader: [ 'multipart/related; type=application/octet-stream; transfer-syntax=*']
      }
    }
  ];

  window.config.defaultDataSourceName = 'dicomweb';

} else {
  window.config.showStudyList = false;
  window.config.dataSources = [
    {
      friendlyName: 'Orthanc DICOM JSON',
      namespace: '@ohif/extension-default.dataSourcesModule.dicomjson',
      sourceName: 'dicomjson',
      configuration: {
        name: 'json',
      },
    }
  ];

  window.config.defaultDataSourceName = 'dicomjson';
}

I’ll have to reference the book and verify that I have everything else updated and configured correctly:

OHIF Plug-in Book Ref

Just wondering why I would be getting the blocked request ?

Addendum: My build was with the Osimis Image: osimis/orthanc:23.12.1-full

I did get it to work by downgrading to osimis/orthanc:23.11.1, so maybe something in the subsequent release ?

Hi @sdscotti

I confirm that this is a bug introduced in Orthanc 1.12.2 as a side effect of a security fix. This is not a configuration issue.

I’ll fix it ASAP.

Best regards,

Alain.

This has been fixed in this commit: orthanc-ohif: bf4e5434567c

I’ll keep you posted about the release of this fix.

1 Like

Thank you. I’ll check the update.

Hello,

This is now released: GDCM plugin 1.6 and OHIF plugin 1.2

Regards,
Sébastien-