【问题标题】:"chrome --allow-file-access-from-files" only for one folder"chrome --allow-file-access-from-files" 仅适用于一个文件夹
【发布时间】:2018-03-27 10:21:36
【问题描述】:

我有这种捆绑网络应用程序的结构:

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

由于各种原因,我想通过 file:// 协议而不是托管 http 服务器来提供服务。

但是,Chrome 无法访问 /assets/ 文件夹中的文件 - 根 (dist) 文件夹中的所有文件都可以正常工作。

我发现我可以运行 chrome "--allow-file-access-from-files",但它被告知很危险,因为它会打开我的整个文件系统以遭受攻击。

有没有办法只对特定文件夹使用“--allow-file-access-from-files”标志?比如:

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

【问题讨论】:

  • 这将是添加到 chrome 上的一个很好的功能,我认为 +1 来自我

标签: google-chrome security chromium


【解决方案1】:

我认为这将是添加到 chrome 上的一个很好的功能 来自我的 +1

【讨论】:

    猜你喜欢
    • 2012-01-23
    • 2011-05-15
    • 2018-04-19
    • 2013-09-06
    • 1970-01-01
    • 1970-01-01
    • 2014-05-13
    • 2016-10-02
    • 2016-05-11
    相关资源
    最近更新 更多