admin管理员组

文章数量:1123035

I'm starting a new web project using next.js (v15.1.4) on a work computer that I do not have admin rights for. My app is going to interact with an external API which I'm trying to test access to. This external API requires HTTPS, however, so I set up my next dev run configuration to include the tag '--experimental-https'. One IT support ticket later, I was able to run that command as administrator such that my self-signed certificate could be generated. I should now be able to connect to localhost through https, right? Well, Edge/Chrome didn't trust this self-signed certificate apparently; I got the net::ERR_CERT_AUTHORITY_INVALID error, with https crossed out in the url search bar.

I tried a couple solutions I've found on the web, including adding the certificate to my Trusted Root Certification Authorities store via certmgr.msc, and enabling the 'WebTransport Developer Mode' flag in my browser, with no changes in the results. There are other browser flag settings that I've seen people say could help, but I don't seem to have those as options, I assume because of either difference in browser version, or security settings forced by administrators.

I've also tried finding the certificate through the 'manage certificates' security setting in Edge/Chrome, and noticed that it wasn't listed in my Trusted Root Certification Authorities store, even though I can find it when I look at my store via certmgr.msc. Chrome even lists it under 'view imported certificates from Windows', but not when I 'manage imported certificates from Windows'. This answer () says it can be solved by exporting the certificate found by the browser as a PKCS #7, single certificate, and then importing it as the same through the browser certificate manager. I can export it as such, but when importing a new one, .pk7 wasn't one of the listed file types. I've tried importing it as 'all files (.)' anyway -- it told me import successful despite it still not showing up there.

Another thing to note is that this doesn't seem to be a problem in FireFox, where it seems to be using HTTPS perfectly fine as far as I can tell. It would be ideal if I could get HTTPS working in Edge/Chrome browsers as well, so I'd appreciate any help I can get!

本文标签: httpsHow can I get EdgeChrome to accept my selfsigned certificate for localhostStack Overflow