Read local data via fetch error

Read local data via fetch error

Before installing LiveServer, read local files through fetch and report an error:

Fetch APT cannot load XXXX URL scheme must be "http" or "https" for CORS request.

Then I started to find a solution. I tried to upload the json file to the server using tomcat, and then read it, but an error was reported.
The reason is that browser security restrictions do not allow cross-domain access, and then modify the web.xml file to solve the problem.
Finally, I saw a Live Server plug-in. Right-click and open Live Server to solve the problem directly.

Guess you like

Origin blog.csdn.net/qq_41612830/article/details/111242277