NPM's Live Server not allowing local files and folders in HTML file

126 Views Asked by At

I have already asked this on the live-server issue log but haven't received any response so I will try on here as well.

I'm trying to a href to a local folder in my HTML file. Typically I would do something like this: <a href="C:\Users\aa\Desktop ....>.

If I just open index.html with chrome using start chrome (ls index.html).fullname in a Powershell command line, I'm able to navigate to the link and view the contents of the folder.

However if I start Live Server on the same file using live-server index.html and navigate to the server instance using chrome, the link to my local folder does not work.

I've also noticed similar behavior when embedding images using <img src ... >, namely that the images are rendered when opening the file directly with Chrome, but not when connecting to the Live Server instance.

How can I get live-server to allow local folders/files?

0

There are 0 best solutions below