proxy hosts get HTTP/2
Created with `http2_support: false`, so the live site runs HTTP/1.1 — six connections and everything else queued behind them. Lighthouse costs it 900 ms, most of it the gallery images waiting on each other. Set in the defaults and again in `attach`, because HTTP/2 only means anything once there is a certificate. A host created before this — both of them here — is secured but still on 1.1, and the attach path is the one that can fix it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
+12
-1
@@ -59,7 +59,15 @@ const NEW_HOST = {
|
||||
access_list_id: 0,
|
||||
certificate_id: 0,
|
||||
ssl_forced: false,
|
||||
http2_support: false,
|
||||
/*
|
||||
HTTP/2. Only takes effect once a certificate is attached, which is why it is set here AND in
|
||||
`attach` — a host created before it was secured would otherwise keep HTTP/1.1 forever, and
|
||||
nothing in the panel would say so.
|
||||
|
||||
On HTTP/1.1 a browser opens six connections and queues everything else behind them, which on this
|
||||
site meant the gallery images waited on each other. Lighthouse put it at 900 ms.
|
||||
*/
|
||||
http2_support: true,
|
||||
hsts_enabled: false,
|
||||
hsts_subdomains: false,
|
||||
advanced_config: '',
|
||||
@@ -177,6 +185,9 @@ export const ProxiesBlock = ({ servers }: { servers: Server[] }) => {
|
||||
await clientRef.current.put(`/proxy-manager/npm/nginx/proxy-hosts/${host.id}`, {
|
||||
certificate_id: certificateId,
|
||||
ssl_forced: true,
|
||||
// The moment HTTP/2 becomes possible at all, so this is where it is turned on for a host that
|
||||
// predates the default above.
|
||||
http2_support: true,
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user