I am experiencing this issue of Refused to connect to 'http://217.76.59.68:4000/parse_pdf' because it violates the document's Content Security Policy.
when I try to call that API.
I’ve tried adding the URL to my .ic-assets.json5
file in my public directory. I have configured my CSP to allow connection only to these domains:
"Content-Security-Policy": "default-src 'self';script-src 'self' 'unsafe-eval';connect-src 'self' http://localhost:* https://icp0.io https://*.icp0.io https://icp-api.io;img-src **http://217.76.59.68:4000/parse_pdf** 'self' data:;style-src * 'unsafe-inline';style-src-elem * 'unsafe-inline';font-src *;object-src 'none';base-uri 'self';frame-ancestors 'none';form-action 'self';upgrade-insecure-requests;",
I’ve also run the command to re-install the canister and update the headers
dfx canister install investafarm_marketplace --mode reinstall
After all these steps and deploying the canister to mainnet again, I am still getting the same error, what might be the issue