Browse Source

feat: allow http-parser NODE_OPTION in packaged apps (#21694)

Shelley Vohr 5 years ago
parent
commit
bb054716c9
2 changed files with 3 additions and 1 deletions
  1. 1 0
      docs/api/environment-variables.md
  2. 2 1
      shell/common/node_bindings.cc

+ 1 - 0
docs/api/environment-variables.md

@@ -48,6 +48,7 @@ Unsupported options are:
 
 ```sh
 --max-http-header-size
+--http-parser
 ```
 
 ### `GOOGLE_API_KEY`

+ 2 - 1
shell/common/node_bindings.cc

@@ -144,7 +144,8 @@ void SetNodeOptions(base::Environment* env) {
       "--force-fips", "--enable-fips"};
 
   // Subset of options allowed in packaged apps
-  const std::set<std::string> allowed_in_packaged = {"--max-http-header-size"};
+  const std::set<std::string> allowed_in_packaged = {"--max-http-header-size",
+                                                     "--http-parser"};
 
   if (env->HasVar("NODE_OPTIONS")) {
     std::string options;