How to enable web security in Chrome after disabling it?

霸气de小男生 提交于 2019-12-02 17:52:29

问题


I did the __disable-web-security in Terminal on Mac. Do I need to enable it again? Or does it enable by itself after restart?

If I need to enable it again, how do I do that? I searched everywhere, but didn't find.


回答1:


Go to chrome://version and look at the Command Line. If the command line argument is still there, you should restart chrome and then launch it normally (without the flag).

A bit more context: "Flag" refers to two slightly different concepts in Chrome:

  1. Any command line argument that starts with a -- (as opposed to an argument that names a URL or a file, for example).
  2. The list of toggles available at chrome://flags.

Any arguments added manually to the command line will only persist until you quit Chrome. On the other hand, the toggles set at chrome://flags will persist until they are reset. (To further blur this, invoking chrome://restart will preserve the command line flags.)

This particular flag makes its presence fairly obvious, with a banner:

You are using an unsupported command-line flag: --disable-web-security. Stability and security will suffer.

So it should hopefully be clear whether the flag is present (and also why this is the sort of flag that can't be persisted at chrome://flags).

The flags set in #2 are delimited in Chrome's command line by the --flags-switches-begin--flags-switches-end section. Arguments outside of that section are coming from somewhere other than chrome://flags (namely, from the command line, except in the case of Chrome OS and Android, which have their own startup procedures).



来源:https://stackoverflow.com/questions/54408671/how-to-enable-web-security-in-chrome-after-disabling-it

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!