0

hello please pardon me this is my first time here, I have a node js application that I use in RSA encryption, and on the client side I'm using jsdelivr <script src="https://cdn.jsdelivr.net/npm/node-forge@1.0.0/dist/forge.min.js"></script> like in the documentation and it works on my Ubuntu perfectly, but for some reason when I place the code in EC2(normal Ubuntu), I get and error regarding prime.workers.js not found, keep notice all my forge operation are client-side I don't do any encryption on the server side.

here is a picture of the error error_pic and here is what i get in the sourcessources_pic

i have tried switching the CDN to Cloudflare but the issue didn't resolve

i want it to work like in my development environment environment

all my socket io logic depends on key generation operation here is the snipt ` generateRSAKeyPair().then(async (keyPair)=>{

const privateKeyPEM = await forge.pki.privateKeyToPem(keyPair.privateKey); const publicKeyPem =await forge.pki.publicKeyToPem(keyPair.publicKey)

const socket = io({query:{publicKey:publicKeyPem}});`

meshari
  • 1
  • 1

0 Answers0