Chrome allow file access from files no longer working (was using to see WebGL/three.js files)? Chrome allow file access from files no longer working (was using to see WebGL/three.js files)? google-chrome google-chrome

Chrome allow file access from files no longer working (was using to see WebGL/three.js files)?


The answer I came up with was to use Firefox instead of Chrome changing the security policy as detailed in https://github.com/mrdoob/three.js/wiki/How-to-run-things-locally

Not a perfect answer but with a deadline looming it's the best workable answer for me right now as trying different variations of Chrome, trying Wamp and also Mongoose didn't work. If I had more time I would work out how to use Python or probably node.js as I've seen it mentioned a number of times as being the faster option.

What gman stated is true, using the Chrome flag (and changing Firefox's security policy) does create a big security risk. But only if you use that shortcut (and it's tabs etc.) for anything other than accessing your own local files. I've been scrupulous about not using it for the internet but don't use this method if you can't be strict with yourself.

Ideally I'd recommend beginning any project with node.js.


Gman's answer is good. If you're in windows environment, and use npm for package management the easiest is to install http-server globally:

npm install -g http-server

Then simply run http-server in any of your project directories:

Eg. d:\my_project> http-server

Starting up http-server, serving ./Available on: http:169.254.116.232:8080 http:192.168.88.1:8080 http:192.168.0.7:8080 http:127.0.0.1:8080Hit CTRL-C to stop the server

Easy, and no security risk of accidentally leaving your browser open vulnerable.


DON'T USE THAT FLAG! You're opening yourself to having your online accounts being hacked and your local data stolen. Here are 2 proof of concept examples

Run a simple server.

It's super simple.

They won't take more than a couple of minutes to download and require no configuration