Open mellester opened 1 year ago
6.5.0
https://github.com/vuejs/devtools/blob/main/packages/shell-electron/server.js
Start the electron app. And navigate in a browser to http://localhost:8098/ Check the mimetype of the page.
The mime type should be 'application/javascript;'
The returned mimetype is 'text/html'.
Wich means if <script src="http://localhost:8098"></script> will not work if strict mime typing is enabled.
<script src="http://localhost:8098"></script>
System: OS: Linux 5.15 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish) CPU: (8) x64 Intel(R) Core(TM) i5-8279U CPU @ 2.40GHz Memory: 2.54 GB / 7.68 GB Container: Yes Shell: 5.8.1 - /usr/bin/zsh Binaries: Node: 18.9.1 - /usr/bin/node Yarn: 1.22.19 - /usr/bin/yarn npm: 8.19.1 - /usr/bin/npm
adding to main/packages/shell-electron/server.js:19 a line like. res.contentType('application/javascript') Could proably fix it.
res.contentType('application/javascript')
Vue devtools version
6.5.0
Link to minimal reproduction
https://github.com/vuejs/devtools/blob/main/packages/shell-electron/server.js
Steps to reproduce & screenshots
Start the electron app. And navigate in a browser to http://localhost:8098/ Check the mimetype of the page.
What is expected?
The mime type should be 'application/javascript;'
What is actually happening?
The returned mimetype is 'text/html'.
Wich means if
<script src="http://localhost:8098"></script>
will not work if strict mime typing is enabled.System Info
Any additional comments?
adding to main/packages/shell-electron/server.js:19 a line like.
res.contentType('application/javascript')
Could proably fix it.