Skip to content

Commit

Permalink
Remove HTTP/2
Browse files Browse the repository at this point in the history
  • Loading branch information
willnode committed Nov 17, 2024
1 parent 7d9e679 commit d52a4a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
8 changes: 1 addition & 7 deletions src/executor/nginx.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,11 @@ class NginxExecutor {
if (sslconf !== "off") {
node._add('listen', info.ip ? info.ip + ":443 ssl" : "443 ssl");
node._add('listen', (info.ip6 || '[::]') + ":443 ssl");
if (httpconf == 2) {
node._add('http2', "on");
}
if (httpconf == 3) {
node._add('listen', info.ip ? info.ip + ":443 quic" : "443 quic");
node._add('listen', (info.ip6 || '[::]') + ":443 quic");
node._add('http2', "on");
node._add('http3', "on");
node._add('add_header', `Alt-Svc 'h3=":443"; ma=86400, h3-29=":443"'`);
node._add('add_header', `Alt-Svc 'h3=":443"; ma=86400'`);
}
} {
node._add('root', info.root);
Expand Down Expand Up @@ -363,8 +359,6 @@ class NginxExecutor {
});
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(' ');
let hasApex = servernames.includes(domain);
Expand Down
4 changes: 2 additions & 2 deletions src/executor/runnersub.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ export async function runConfigSubdomain(config, domaindata, subdomain, sshExec,
var nginxNodes = await nginxExec.get(subdomain);
var nginxInfos = nginxExec.extractInfo(nginxNodes, subdomain);
value = parseInt(value);
if (![1, 2, 3].includes(value)) {
throw new Error(`http option invalid. specify "http 1", "http 2" or "http 3"`);
if (![1, 3].includes(value)) {
throw new Error(`http option invalid. specify "http 1" or "http 3"`);
}
if (value === nginxInfos.http) {
await writeLog("$> http version config is set unchanged");
Expand Down

0 comments on commit d52a4a2

Please sign in to comment.