CORS in plugins
When CORS is enabled on server from which plugin is being downloaded following error is being thrown. Either provide proper error message, or solve it via proxy/server query.
Failed to load https://git-r3lab.uni.lu/piotr.gawron/vizAR/raw/master/src/js/plugin.js: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://minerva-dev.lcsb.uni.lu' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
minerva.js.xhtml:56796 [31m[2018-03-23 13:17:05.334] [ERROR] [default] - [39m[Error: Failed to fetch]
Error: Failed to fetch
at new NetworkError (https://minerva-dev.lcsb.uni.lu/minerva/javax.faces.resource/minerva.js.xhtml?ln=js&m_version=dd9bc16f4b5dbf23d38cb9c45c6108fcc102bc60:134307:17)
at Request._callback (https://minerva-dev.lcsb.uni.lu/minerva/javax.faces.resource/minerva.js.xhtml?ln=js&m_version=dd9bc16f4b5dbf23d38cb9c45c6108fcc102bc60:134742:16)
at self.callback (https://minerva-dev.lcsb.uni.lu/minerva/javax.faces.resource/minerva.js.xhtml?ln=js&m_version=dd9bc16f4b5dbf23d38cb9c45c6108fcc102bc60:106165:22)
at Request.EventEmitter.emit (https://minerva-dev.lcsb.uni.lu/minerva/javax.faces.resource/minerva.js.xhtml?ln=js&m_version=dd9bc16f4b5dbf23d38cb9c45c6108fcc102bc60:35669:17)
at Request.onRequestError (https://minerva-dev.lcsb.uni.lu/minerva/javax.faces.resource/minerva.js.xhtml?ln=js&m_version=dd9bc16f4b5dbf23d38cb9c45c6108fcc102bc60:106857:8)
at module.exports.EventEmitter.emit (https://minerva-dev.lcsb.uni.lu/minerva/javax.faces.resource/minerva.js.xhtml?ln=js&m_version=dd9bc16f4b5dbf23d38cb9c45c6108fcc102bc60:35669:17)
at https://minerva-dev.lcsb.uni.lu/minerva/javax.faces.resource/minerva.js.xhtml?ln=js&m_version=dd9bc16f4b5dbf23d38cb9c45c6108fcc102bc60:117657:9
From previous event:
at ObjectWithListeners.ServerConnector._sendRequest (https://minerva-dev.lcsb.uni.lu/minerva/javax.faces.resource/minerva.js.xhtml?ln=js&m_version=dd9bc16f4b5dbf23d38cb9c45c6108fcc102bc60:134739:10)
at https://minerva-dev.lcsb.uni.lu/minerva/javax.faces.resource/minerva.js.xhtml?ln=js&m_version=dd9bc16f4b5dbf23d38cb9c45c6108fcc102bc60:134708:17
From previous event:
at ObjectWithListeners.ServerConnector.sendRequest (https://minerva-dev.lcsb.uni.lu/minerva/javax.faces.resource/minerva.js.xhtml?ln=js&m_version=dd9bc16f4b5dbf23d38cb9c45c6108fcc102bc60:134707:61)
at Plugin.load (https://minerva-dev.lcsb.uni.lu/minerva/javax.faces.resource/minerva.js.xhtml?ln=js&m_version=dd9bc16f4b5dbf23d38cb9c45c6108fcc102bc60:160956:26)
at PluginManager.addPlugin (https://minerva-dev.lcsb.uni.lu/minerva/javax.faces.resource/minerva.js.xhtml?ln=js&m_version=dd9bc16f4b5dbf23d38cb9c45c6108fcc102bc60:161156:17)
at HTMLButtonElement.onclick (https://minerva-dev.lcsb.uni.lu/minerva/javax.faces.resource/minerva.js.xhtml?ln=js&m_version=dd9bc16f4b5dbf23d38cb9c45c6108fcc102bc60:138867:38)