After vite project service is started

It’s HTTP, but it’s HTTPS? IP access fails, but why doesn’t localhost request HTTPS?

In vite. Config. Ts configuration

server: {
    https:true
},
Copy the code

The local service is HTTPS, local and IP access is normal, but I do not need HTTPS ah…

Suddenly the IP address is not displayed

This is then added in the vite.config.ts configuration

server: {
    https:true.host:'0.0.0.0'
},
Copy the code

The IP is displayed correctly. Is it due to vite version upgrade?

And then within the header is found to have such a statement, it means when loading HTTP resources automatically replaced with HTTPS requests, commented after the IP address can be normal open, however the git submit records show that I am specially to add this one, but didn’t write why add…

<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
Copy the code