tvjsx / trading-vue-js

💹 Hackable charting lib for traders. You can draw literally ANYTHING on top of candlestick charts. [Not Maintained]
https://tvjsx.github.io/trading-vue-demo/
MIT License
2.09k stars 638 forks source link

chrome block trading-vue.min.js #173

Closed hossein2408 closed 3 years ago

hossein2408 commented 3 years ago

why chrome block trading-vue.min.js ?

Content Security Policy of your site blocks some resources because their origin is not included in the content security policy header

Untitled-1

C451 commented 3 years ago

Need more data, just checked on chrome and got no issues. What's OS, did you get that on tvjs.io/play ?

hossein2408 commented 3 years ago

in line 15911 trading vue js this.worker = new Worker(URL.createObjectURL(blob)); this error : Refused to create a worker from 'blob:http://localhost:15536/494ac1a3-04d2-4e38-84f1-518616d20898' because it violates the following Content Security Policy directive: "script-src * 'unsafe-inline' 'unsafe-eval'". Note that 'worker-src' was not explicitly set, so 'script-src' is used as a fallback. Uncaught DOMException: Failed to construct 'Worker': Access to the script at 'blob:http://localhost:15536/494ac1a3-04d2-4e38-84f1-518616d20898' is denied by the document's Content Security Policy.

i add this meta tag to my html header but not solved


<meta http-equiv="Content-Security-Policy" content="default-src *; child-src * 'self' blob: http:; worker-src * 'self' blob:;
img-src * 'self' data: http:; script-src 'self' 'unsafe-inline' 'unsafe-eval' *;
style-src 'self' 'unsafe-inline' *"
```>
hossein2408 commented 3 years ago

Need more data, just checked on chrome and got no issues. What's OS, did you get that on tvjs.io/play ?

windows 10 visual studio 2019 .net core 3.1 i wanna run trading vue with js file with my data not with nodeJs server

C451 commented 3 years ago

I couldn't reproduce this (I tried tvjs.io, demo, npm run test), none of them are showing the issue. So let's wait until someone confirms that.

C451 commented 3 years ago

No further evidence, closing for now.