mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-11 18:30:25 +08:00
源站支持HTTP/2
This commit is contained in:
@@ -40,6 +40,7 @@ func (this *AddOriginPopupAction) RunPost(params struct {
|
||||
DomainsJSON []byte
|
||||
Host string
|
||||
FollowPort bool
|
||||
Http2Enabled bool
|
||||
|
||||
Must *actions.Must
|
||||
}) {
|
||||
@@ -158,6 +159,7 @@ func (this *AddOriginPopupAction) RunPost(params struct {
|
||||
Domains: domains,
|
||||
Host: params.Host,
|
||||
FollowPort: params.FollowPort,
|
||||
Http2Enabled: params.Http2Enabled,
|
||||
})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
|
||||
@@ -67,6 +67,7 @@ func (this *IndexAction) RunGet(params struct {
|
||||
"hasCert": originConfig.Cert != nil,
|
||||
"host": originConfig.RequestHost,
|
||||
"followPort": originConfig.FollowPort,
|
||||
"http2Enabled": originConfig.HTTP2Enabled,
|
||||
}
|
||||
primaryOriginMaps = append(primaryOriginMaps, m)
|
||||
}
|
||||
@@ -85,6 +86,7 @@ func (this *IndexAction) RunGet(params struct {
|
||||
"hasCert": originConfig.Cert != nil,
|
||||
"host": originConfig.RequestHost,
|
||||
"followPort": originConfig.FollowPort,
|
||||
"http2Enabled": originConfig.HTTP2Enabled,
|
||||
}
|
||||
backupOriginMaps = append(backupOriginMaps, m)
|
||||
}
|
||||
|
||||
@@ -67,6 +67,7 @@ func (this *IndexAction) RunGet(params struct {
|
||||
"hasCert": originConfig.Cert != nil,
|
||||
"host": originConfig.RequestHost,
|
||||
"followPort": originConfig.FollowPort,
|
||||
"http2Enabled": originConfig.HTTP2Enabled,
|
||||
}
|
||||
primaryOriginMaps = append(primaryOriginMaps, m)
|
||||
}
|
||||
@@ -85,6 +86,7 @@ func (this *IndexAction) RunGet(params struct {
|
||||
"hasCert": originConfig.Cert != nil,
|
||||
"host": originConfig.RequestHost,
|
||||
"followPort": originConfig.FollowPort,
|
||||
"http2Enabled": originConfig.HTTP2Enabled,
|
||||
}
|
||||
backupOriginMaps = append(backupOriginMaps, m)
|
||||
}
|
||||
|
||||
@@ -67,6 +67,7 @@ func (this *IndexAction) RunGet(params struct {
|
||||
"hasCert": originConfig.Cert != nil,
|
||||
"host": originConfig.RequestHost,
|
||||
"followPort": originConfig.FollowPort,
|
||||
"http2Enabled": originConfig.HTTP2Enabled,
|
||||
}
|
||||
primaryOriginMaps = append(primaryOriginMaps, m)
|
||||
}
|
||||
@@ -85,6 +86,7 @@ func (this *IndexAction) RunGet(params struct {
|
||||
"hasCert": originConfig.Cert != nil,
|
||||
"host": originConfig.RequestHost,
|
||||
"followPort": originConfig.FollowPort,
|
||||
"http2Enabled": originConfig.HTTP2Enabled,
|
||||
}
|
||||
backupOriginMaps = append(backupOriginMaps, m)
|
||||
}
|
||||
|
||||
@@ -68,6 +68,7 @@ func (this *IndexAction) RunGet(params struct {
|
||||
"hasCert": originConfig.Cert != nil,
|
||||
"host": originConfig.RequestHost,
|
||||
"followPort": originConfig.FollowPort,
|
||||
"http2Enabled": originConfig.HTTP2Enabled,
|
||||
}
|
||||
primaryOriginMaps = append(primaryOriginMaps, m)
|
||||
}
|
||||
@@ -86,6 +87,7 @@ func (this *IndexAction) RunGet(params struct {
|
||||
"hasCert": originConfig.Cert != nil,
|
||||
"host": originConfig.RequestHost,
|
||||
"followPort": originConfig.FollowPort,
|
||||
"http2Enabled": originConfig.HTTP2Enabled,
|
||||
}
|
||||
backupOriginMaps = append(backupOriginMaps, m)
|
||||
}
|
||||
|
||||
@@ -73,6 +73,7 @@ func (this *AddPopupAction) RunPost(params struct {
|
||||
DomainsJSON []byte
|
||||
Host string
|
||||
FollowPort bool
|
||||
Http2Enabled bool
|
||||
|
||||
Description string
|
||||
IsOn bool
|
||||
@@ -248,6 +249,7 @@ func (this *AddPopupAction) RunPost(params struct {
|
||||
Domains: domains,
|
||||
Host: params.Host,
|
||||
FollowPort: params.FollowPort,
|
||||
Http2Enabled: params.Http2Enabled,
|
||||
})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
|
||||
@@ -115,6 +115,7 @@ func (this *UpdatePopupAction) RunGet(params struct {
|
||||
"domains": config.Domains,
|
||||
"host": config.RequestHost,
|
||||
"followPort": config.FollowPort,
|
||||
"http2Enabled": config.HTTP2Enabled,
|
||||
"oss": config.OSS,
|
||||
}
|
||||
|
||||
@@ -145,6 +146,7 @@ func (this *UpdatePopupAction) RunPost(params struct {
|
||||
DomainsJSON []byte
|
||||
Host string
|
||||
FollowPort bool
|
||||
Http2Enabled bool
|
||||
|
||||
Description string
|
||||
IsOn bool
|
||||
@@ -323,6 +325,7 @@ func (this *UpdatePopupAction) RunPost(params struct {
|
||||
Domains: domains,
|
||||
Host: params.Host,
|
||||
FollowPort: params.FollowPort,
|
||||
Http2Enabled: params.Http2Enabled,
|
||||
})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
|
||||
@@ -95,6 +95,7 @@ func (this *IndexAction) RunGet(params struct {
|
||||
"hasCert": originConfig.Cert != nil,
|
||||
"host": originConfig.RequestHost,
|
||||
"followPort": originConfig.FollowPort,
|
||||
"http2Enabled": originConfig.HTTP2Enabled,
|
||||
}
|
||||
primaryOriginMaps = append(primaryOriginMaps, m)
|
||||
}
|
||||
@@ -113,6 +114,7 @@ func (this *IndexAction) RunGet(params struct {
|
||||
"hasCert": originConfig.Cert != nil,
|
||||
"host": originConfig.RequestHost,
|
||||
"followPort": originConfig.FollowPort,
|
||||
"http2Enabled": originConfig.HTTP2Enabled,
|
||||
}
|
||||
backupOriginMaps = append(backupOriginMaps, m)
|
||||
}
|
||||
|
||||
@@ -109,6 +109,7 @@ Vue.component("origin-list-table", {
|
||||
<tiny-basic-label v-if="origin.hasCert">证书</tiny-basic-label>
|
||||
<tiny-basic-label v-if="origin.host != null && origin.host.length > 0">主机名: {{origin.host}}</tiny-basic-label>
|
||||
<tiny-basic-label v-if="origin.followPort">端口跟随</tiny-basic-label>
|
||||
<tiny-basic-label v-if="origin.addr != null && origin.addr.startsWith('https://') && origin.http2Enabled">HTTP/2</tiny-basic-label>
|
||||
|
||||
<span v-if="origin.domains != null && origin.domains.length > 0"><tiny-basic-label v-for="domain in origin.domains">匹配: {{domain}}</tiny-basic-label></span>
|
||||
<span v-else-if="hasMatchedDomains"><tiny-basic-label>匹配: 所有域名</tiny-basic-label></span>
|
||||
|
||||
@@ -70,7 +70,14 @@
|
||||
<td>端口跟随</td>
|
||||
<td>
|
||||
<checkbox name="followPort"></checkbox>
|
||||
<p class="comment">选中后表示源站的端口保持和用户访问的服务端口保持一致;此时的源站地址中的端口号可以任意填写。</p>
|
||||
<p class="comment">选中后,表示源站的端口保持和用户访问的服务端口保持一致;此时的源站地址中的端口号可以任意填写。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-show="!isOSS && protocol == 'https'">
|
||||
<td>支持HTTP/2</td>
|
||||
<td>
|
||||
<checkbox name="http2Enabled"></checkbox>
|
||||
<p class="comment">选中后,表示源站支持HTTP/2协议。</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -76,6 +76,13 @@
|
||||
<p class="comment">选中后表示源站的端口保持和用户访问的服务端口保持一致;此时的源站地址中的端口号可以任意填写。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-show="!isOSS && protocol == 'https'">
|
||||
<td>支持HTTP/2</td>
|
||||
<td>
|
||||
<checkbox name="http2Enabled"></checkbox>
|
||||
<p class="comment">选中后,表示源站支持HTTP/2协议。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>权重</td>
|
||||
<td>
|
||||
|
||||
@@ -77,6 +77,13 @@
|
||||
<p class="comment">选中后表示源站的端口保持和用户访问的服务端口保持一致;此时的源站地址中的端口号可以任意填写。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-show="!isOSS && origin.protocol == 'https'">
|
||||
<td>支持HTTP/2</td>
|
||||
<td>
|
||||
<checkbox name="http2Enabled" v-model="origin.http2Enabled"></checkbox>
|
||||
<p class="comment">选中后,表示源站支持HTTP/2协议。</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>权重</td>
|
||||
<td>
|
||||
|
||||
Reference in New Issue
Block a user