bartosz.baczek
bartosz.baczek

Reputation: 1516

"chrome --allow-file-access-from-files" only for one folder

I have this structure of bundled web app:

/dist
|
|- index.html
|- inline.js
|- main.js
|- polyfills.js
|- favicon.ico
|-assets
  |
  |-icons
    |
    |- add.svg
    |- arrow-down.svg
    |- start.svg

Due to various reasons I want to serve it via file:// protocol instead of hosting http server.

However, Chrome can't acces files that are located in /assets/ folder - all files that are in root (dist) folder work fine.

I found out that I can run chrome "--allow-file-access-from-files", however it's told to be dangerous, as it opens my whole file system to attacks.

Is there any way to use "--allow-file-access-from-files" flag only for specific folder? Something like:

$ chrome --allow-file-access-from-files ./assets/**

Upvotes: 3

Views: 1095

Answers (1)

ovi
ovi

Reputation: 460

that would be a good feature to add on chrome I think +1 from me

Upvotes: 0

Related Questions