feat: init h2c (http2/grpc) support
This commit is contained in:
@@ -79,6 +79,7 @@
|
||||
let isBot = application.settings?.isBot;
|
||||
let isDBBranching = application.settings?.isDBBranching;
|
||||
let htmlUrl = application.gitSource?.htmlUrl;
|
||||
let isHttp2 = application.settings.isHttp2;
|
||||
|
||||
let dockerComposeFile = JSON.parse(application.dockerComposeFile) || null;
|
||||
let dockerComposeServices: any[] = [];
|
||||
@@ -195,6 +196,9 @@
|
||||
if (name === 'isDBBranching') {
|
||||
isDBBranching = !isDBBranching;
|
||||
}
|
||||
if (name === 'isHttp2') {
|
||||
isHttp2 = !isHttp2;
|
||||
}
|
||||
try {
|
||||
await post(`/applications/${id}/settings`, {
|
||||
previews,
|
||||
@@ -204,6 +208,7 @@
|
||||
autodeploy,
|
||||
isDBBranching,
|
||||
isCustomSSL,
|
||||
isHttp2,
|
||||
branch: application.branch,
|
||||
projectId: application.projectId
|
||||
});
|
||||
@@ -746,6 +751,16 @@
|
||||
on:click={() => !isDisabled && changeSettings('dualCerts')}
|
||||
/>
|
||||
</div>
|
||||
<div class="grid grid-cols-2 items-center pb-4">
|
||||
<Setting
|
||||
id="isHttp2"
|
||||
isCenter={false}
|
||||
bind:setting={isHttp2}
|
||||
title="Enable HTTP/2 (h2c only)"
|
||||
description="Enable HTTP/2 protocol. <br><br>HTTP/2 is a major revision of the HTTP network protocol used by the World Wide Web that allows faster web page loading by reducing the number of requests needed to load a web page.<br><br>Useful for gRPC and other HTTP/2 based services."
|
||||
on:click={() => changeSettings('isHttp2')}
|
||||
/>
|
||||
</div>
|
||||
{#if isHttps && application.buildPack !== 'compose'}
|
||||
<div class="grid grid-cols-2 items-center pb-4">
|
||||
<Setting
|
||||
|
||||
Reference in New Issue
Block a user