Possible CORS error when trying to utilize package in angular project #66
-
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
It looks to me like the web page is being loaded from http://localhost:8080, but the scripts on the page are being served from a By default the URL of tesseract-worker.js is determined from the URL of the JavaScript bundle that the |
Beta Was this translation helpful? Give feedback.
-
邮件已经收到了^_^
|
Beta Was this translation helpful? Give feedback.
-
这是来自QQ邮箱的假期自动回复邮件。你好,我是紫妍。你的邮件已收到,谢谢!
|
Beta Was this translation helpful? Give feedback.
-
?
…On Thu, 29 Dec 2022 at 2:08 AM Dyz ***@***.***> wrote:
邮件已经收到了^_^
—
Reply to this email directly, view it on GitHub
<#66 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQWD6SO7JT6GFF2HBHCTJOLWPTJARANCNFSM6AAAAAASZ4ZFQM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
It looks to me like the web page is being loaded from http://localhost:8080, but the scripts on the page are being served from a
file://
URL. Due to browser security restrictions, the tesseract-worker.js file needs to be served from the same origin (the "http://localhost:8080" part of the URL) as the web page itself.By default the URL of tesseract-worker.js is determined from the URL of the JavaScript bundle that the
OCRClient
class has been packaged into. However you can override it using theworkerURL
option:new OCRClient({ workerURL: 'http://localhost:8080/path/to/tesseract-worker.js' })
. There is also awasmBinary
option which you can use to specify he path to the.wasm
files.