Skip to content

Commit

Permalink
alpha: disable cloud proxy on managed certs
Browse files Browse the repository at this point in the history
  • Loading branch information
23doors committed May 25, 2022
1 parent 307c424 commit 578d846
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions deploy/load_balancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/outblocks/outblocks-plugin-go/registry/fields"
"github.com/outblocks/outblocks-plugin-go/types"
plugin_util "github.com/outblocks/outblocks-plugin-go/util"
"google.golang.org/protobuf/types/known/structpb"
)

type LoadBalancer struct {
Expand Down Expand Up @@ -125,6 +126,14 @@ func (o *LoadBalancer) processDomain(pctx *config.PluginContext, r *registry.Reg
return err
}

if domainInfo != nil {
if domainInfo.Other.GetFields() == nil {
domainInfo.Other, _ = structpb.NewStruct(nil)
}

domainInfo.Other.GetFields()["cloudflare_proxy"] = structpb.NewBoolValue(false)
}

o.ManagedSSLs = append(o.ManagedSSLs, cert)
o.ManagedSSLDomainMap[domain] = cert

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ require (
google.golang.org/api v0.70.0
google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106
google.golang.org/grpc v1.45.0
google.golang.org/protobuf v1.27.1
)

require (
Expand Down Expand Up @@ -45,7 +46,6 @@ require (
golang.org/x/text v0.3.7 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.27.1 // indirect
)

// replace github.com/outblocks/outblocks-plugin-go => ../outblocks-plugin-go

0 comments on commit 578d846

Please sign in to comment.