VMware {code} Community
kumartade
Enthusiast
Enthusiast

Unable to make remote plugin rendered removing

Hi,

we had decouple the backend and frontend code in the sdk sample. Our aim is to have the UI only running on manifest server and make api calls for data using auxiliary servers. In the process I had made changes and every thing is working fine.

As part of requirement, we want to get rid of java and artifact generation as .jar. As a first step up I had taken the dist folder and serving them using static http-server (https://github.com/http-party/http-server) and changed context-path/basehref from '/sample-ui' to '/'. This is same case even if we change the application.properties context-path to '/'

After that plugin stopped rendering and showing the below error:

Refused to apply style from 'https://10.60.6.6/plugins/com.acme.plugin.remote~1.0.0.0~-1202886956/styles.css' because its MIME type ('text/plain') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

I'm able to see the application by accessing the remote url. Is this restriction from Plugin iframe?

Please suggest.

0 Kudos
1 Reply
amarinov
VMware Employee
VMware Employee

Hi @kumartade,

As evident by the error "Refused to apply style from 'https://10.60.6.6/plugins/com.acme.plugin.remote~1.0.0.0~-1202886956/styles.css' because its MIME type ('text/plain') is not a supported stylesheet MIME type, and strict MIME checking is enabled." it seems that the http-party/http-server you are using does not return the correct MIME type for the CSS file and the browser refuses to render the CSS. There is an open issue in the GitHub page of http-party/http-server about additional mime types support: https://github.com/http-party/http-server/issues/35. Please try using another server that has the necessary mime types support.

Thanks,
Aleksandar

 

0 Kudos