arl / statsviz

🚀 Visualise your Go program runtime metrics in real time in the browser
MIT License
3.19k stars 121 forks source link

fix: js error in strict webserver envir #105

Closed rogozhka closed 1 year ago

rogozhka commented 1 year ago

Hello. I had an issue, running the Statsviz in production: browser could not parse js with content-type text/plain. This pr solves the issue.

Please consider to use provided code. If not as is but at least as an idea of providing additional headers from embedded fs. Used a table with too much data as a general solution. I wasn't sure if it was a good idea to include all the extensions, but nevertheless, I decided to generalize :)

Best wishes.

arl commented 1 year ago

I fixed the issue in #106 so I'm closing this. Thanks again. FYI This is released in v0.5.2