kisonecat / tikzjax

TikZJax is TikZ running under WebAssembly in the browser
LaTeX Project Public License v1.3c
437 stars 36 forks source link

CORS #15

Open JeffersonUCC opened 2 years ago

JeffersonUCC commented 2 years ago

Following the instructions including the js and css file into the head of the HTML and using a script tag for the tikz picture I get a CORS error in the console.

Access to fetch at 'http://tikzjax.com/ef253ef29e2f057334f77ead7f06ed8f22607d38.wasm' from origin 'http://127.0.0.1:8000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

This happens to both localhost and a domain.

Any help is appreciated.

matheusfillipe commented 2 years ago

Use https:

<link rel="stylesheet" type="text/css" href="https://tikzjax.com/v1/fonts.css">
<script src="https://tikzjax.com/v1/tikzjax.js"></script>