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

**URL:** https://discourse.orthanc-server.org/t/ohif-plug-in-question-app-config-js-blocked-due-to-mime-type/4174
**Category:** General
**Created:** [December 31, 2023, 8:48am UTC](https://discourse.orthanc-server.org/t/ohif-plug-in-question-app-config-js-blocked-due-to-mime-type/4174 "2023-12-31T08:48:37Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![sdscotti](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/sdscotti/32/2563_2.png) [@sdscotti](https://discourse.orthanc-server.org/u/sdscotti)
#### Post date: [December 31, 2023, 8:48am UTC](https://discourse.orthanc-server.org/t/ohif-plug-in-question-app-config-js-blocked-due-to-mime-type/4174/1 "2023-12-31T08:48:37Z")

</div>

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](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:

```auto

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](https://orthanc.uclouvain.be/book/plugins/ohif.html)

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 ?

---

<div class="post-metadata">

### Author: ![alainmazy](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/alainmazy/32/1576_2.png) [@alainmazy](https://discourse.orthanc-server.org/u/alainmazy)
#### Post date: [January 3, 2024, 9:27am UTC](https://discourse.orthanc-server.org/t/ohif-plug-in-question-app-config-js-blocked-due-to-mime-type/4174/2 "2024-01-03T09:27:20Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![alainmazy](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/alainmazy/32/1576_2.png) [@alainmazy](https://discourse.orthanc-server.org/u/alainmazy)
#### Post date: [January 3, 2024, 9:56am UTC](https://discourse.orthanc-server.org/t/ohif-plug-in-question-app-config-js-blocked-due-to-mime-type/4174/3 "2024-01-03T09:56:57Z")

</div>

This has been fixed in this commit: [orthanc-ohif: bf4e5434567c](https://orthanc.uclouvain.be/hg/orthanc-ohif/rev/bf4e5434567c)

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

---

<div class="post-metadata">

### Author: ![sdscotti](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/sdscotti/32/2563_2.png) [@sdscotti](https://discourse.orthanc-server.org/u/sdscotti)
#### Post date: [January 4, 2024, 6:43am UTC](https://discourse.orthanc-server.org/t/ohif-plug-in-question-app-config-js-blocked-due-to-mime-type/4174/4 "2024-01-04T06:43:57Z")

</div>

Thank you. I’ll check the update.

---

<div class="post-metadata">

### Author: ![jodogne](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/jodogne/32/1511_2.png) [@jodogne](https://discourse.orthanc-server.org/u/jodogne)
#### Post date: [January 4, 2024, 6:24pm UTC](https://discourse.orthanc-server.org/t/ohif-plug-in-question-app-config-js-blocked-due-to-mime-type/4174/5 "2024-01-04T18:24:48Z")

</div>

Hello,

This is now released: [GDCM plugin 1.6 and OHIF plugin 1.2](https://discourse.orthanc-server.org/t/gdcm-plugin-1-6-and-ohif-plugin-1-2/4185)

Regards,  
Sébastien-
