|
@@ -807,13 +807,11 @@ func (s *aidedWebService) ConfigureWebsocket(ctx context.Context, webId int64) e
|
|
|
|
|
|
// ConfigureProxyProtocol 配置代理协议
|
|
|
func (s *aidedWebService) ConfigureProxyProtocol(ctx context.Context, proxy bool, webId int64) error {
|
|
|
- if proxy {
|
|
|
- if err := s.proxy.EditProxy(ctx, webId, v1.ProxyProtocolJSON{
|
|
|
- IsOn: true,
|
|
|
- Version: proxyProtocolVersion,
|
|
|
- }); err != nil {
|
|
|
- return fmt.Errorf("启用代理协议失败: %w", err)
|
|
|
- }
|
|
|
+ if err := s.proxy.EditProxy(ctx, webId, v1.ProxyProtocolJSON{
|
|
|
+ IsOn: proxy,
|
|
|
+ Version: proxyProtocolVersion,
|
|
|
+ }); err != nil {
|
|
|
+ return fmt.Errorf("启用代理协议失败: %w", err)
|
|
|
}
|
|
|
return nil
|
|
|
}
|