Does Chrome allow access to files from files no longer works (used to view WebGL / three.js files)?

I used the Chrome shortcut with allow-file-access-from-files in the target file to work with my three.js student project files. But one morning it stopped working and a Chrome update appeared. I redid the shortcut, but not joy.

Part of the project I am doing is creating a three.js animation that works in a common browser (for which I chose Chrome).

Is there a way to force Chrome to allow access to files again?

Thanks.

+6
source share
3 answers

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

Not an ideal answer, but with a deadline that brings the best workable answer for me right now, when you try to use different variants of Chrome, trying to use Wamp, as well as Mongoose, it does not work. If I had more time, I would think about how to use Python or perhaps node.js, as I saw him mention several times as a faster option.

What gman claims is true, using the Chrome flag (and changing the Firefox security policy) poses a big security risk. But only if you use this shortcut (and its tabs, etc.) for anything other than accessing your local files. I tried not to use it for the Internet, but I do not use this method if you cannot be strict with yourself.

Ideally, I recommend starting any project with node.js.

+3
source

Gman's answer is good. If you are in a Windows environment and use npm to manage packages, the easiest way to install an http server around the world is:

npm install -g http-server

Then just 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:8080 Hit CTRL-C to stop the server

A simple and no security risk if you accidentally exit the browser vulnerable.

+3
source

DO NOT USE THE FLAG! . You open yourself when your Internet accounts are hacked and your local data is stolen. Here are two proofs of conceptual examples.

Start a simple server.

It is super easy.

No more than a couple of minutes to download and no configuration required

+2
source

Source: https://habr.com/ru/post/972457/


All Articles