简体   繁体   中英

Why does the SimpleHTTPServer not serve wav files when serving a node.js app?

When I do a

http://localhost:8090/

Most of the files in the root directory are displayed: eg .js and .py . But all of the .wav files are omitted. When trying to access it directly:

localhost:8090/mywav.wav

a 404 is returned. Is there some configuration causing this?

Apparently this has to do with node.js . On a hunch I re-ran

 npm init

Now the wav files - which I had added recently after the initial npm init do show up. So.. does that mean that node is whitelisting files - presumably for security purposes? I still do wonder then if there were a way to disable that given this is a localhost server accessed by me myself and I.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM