Currently I am working on a project where I am using nodeJs as a backend and I have configured backed to share resources with each and every origin
- import cors from ‘cors’;
- app.use(cors());
But here I am facing some issue like whenever I am requesting resources from let’s say ‘http://example34’ to my api to share resources it is sharing resources without problem but if I am requesting same resource through ‘https://example34’ it is saying cannot share the resources cors error I don’t know why.
I tried couple of things like I thought it could be a issue because of SSL_TLS certificate I validated SSL-TLS signed by a known-authority for both the client and server but nothing worked out and I am expecting to share the resources for both ‘http://example34’ as well as ‘https://exaple34’