Skip to content

Commit 3254d08

Browse files
committed
TUN-6014: Add remote config flag as default feature
1 parent d68ad89 commit 3254d08

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmd/cloudflared/tunnel/configuration.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ var (
4141

4242
LogFieldHostname = "hostname"
4343

44-
secretFlags = [2]*altsrc.StringFlag{credentialsContentsFlag, tunnelTokenFlag}
44+
secretFlags = [2]*altsrc.StringFlag{credentialsContentsFlag, tunnelTokenFlag}
45+
defaultFeatures = []string{supervisor.FeatureAllowRemoteConfig, supervisor.FeatureSerializedHeaders}
4546
)
4647

4748
// returns the first path that contains a cert.pem file. If none of the DefaultConfigSearchDirectories
@@ -225,7 +226,7 @@ func prepareTunnelConfig(
225226
return nil, nil, errors.Wrap(err, "can't generate connector UUID")
226227
}
227228
log.Info().Msgf("Generated Connector ID: %s", clientUUID)
228-
features := append(c.StringSlice("features"), supervisor.FeatureSerializedHeaders)
229+
features := append(c.StringSlice("features"), defaultFeatures...)
229230
if c.IsSet(TunnelTokenFlag) {
230231
if transportProtocol == connection.AutoSelectFlag {
231232
protocolFetcher = func() (edgediscovery.ProtocolPercents, error) {
@@ -243,7 +244,6 @@ func prepareTunnelConfig(
243244
return preferQuic, nil
244245
}
245246
}
246-
features = append(features, supervisor.FeatureAllowRemoteConfig)
247247
log.Info().Msg("Will be fetching remotely managed configuration from Cloudflare API. Defaulting to protocol: quic")
248248
}
249249
namedTunnel.Client = tunnelpogs.ClientInfo{

0 commit comments

Comments
 (0)