I'm working on a project requiring HTTPS, so I startup a HTTPS server with self-signed certificate. I also have an HTTP API Server with CORS enabled.
I'm able to fetch API request on Chrome. Here the header of preflight response (with HTTP status code 204):
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: appversion,channel,content-type,language
Access-Control-Allow-Methods: GET,HEAD,PUT,PATCH,POST,DELETE
Access-Control-Allow-Origin: https://localhost:3001
Connection: keep-alive
Content-Length: 0
Date: Thu, 23 Aug 2018 04:04:45 GMT
Vary: Origin, Access-Control-Request-Headers
But I got error on Firefox.
If I stop my HTTPS server and run a HTTP server, my project works on Firefox. Is there anyway to fix this on my dev environment?