Skip to content

Commit

Permalink
Add HTTP3 option
Browse files Browse the repository at this point in the history
  • Loading branch information
willnode committed Nov 16, 2024
1 parent 973b514 commit 78efafb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/executor/nginx.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ class NginxExecutor {
if (httpconf == 2) {
node._add('http2', "on");
}
if (httpconf == 3) {
node._add('http3', "on");
node._add('add_header', `Alt-Svc 'h3=":8443"; ma=86400'`);
}
} {
node._add('root', info.root);
node._add('access_log', info.access_log);
Expand Down Expand Up @@ -354,7 +358,9 @@ class NginxExecutor {
data[ip.startsWith("[") ? "ip6" : "ip"] = ip;
data.ssl |= x._value.includes("ssl") ? 2 : 1;
});
if (node.http2 && node.http2[0]._value == "on") {
if (node.http3?.[0]._value == "on") {
data.http = 3;
} else if (node.http2?.[0]._value == "on") {
data.http = 2;
}
let servernames = (node.server_name[0]?._value || '').split(' ');
Expand Down

0 comments on commit 78efafb

Please sign in to comment.