Closed xiexiao closed 3 years ago
The embedded JS files are already served with the correct response header. Also, this would be the wrong place to add the header if it wasn't.
Thanks anyways!
Hey, I look into the code details. https://github.com/golang/go/blob/master/src/mime/type.go#L105 // On Windows, MIME types are extracted from the registry.
I run easy-novnc on Windows 10.
And in the registry, the .js file set the Content Type is text/plain
.
Some application must have done it since I can't reproduce it on my VM (the registry doesn't override the mimetype for .js
).
I just fixed the problem by change the Content Type from text/plain to text/javascript of .js in the registry. Every thing is ok now. Thanks!
Javascript files should add application/javascript in response header in Chrome.