Skip to content

Commit 4311097

Browse files
committed
fix content type error
1 parent ae5f2d4 commit 4311097

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

pkg/apisix/cluster.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,7 @@ func (c *cluster) updateResource(ctx context.Context, url, resource string, body
771771
if err != nil {
772772
return nil, err
773773
}
774+
req.Header.Set("Content-Type", "application/json")
774775
start := time.Now()
775776
resp, err := c.do(req)
776777
if err != nil {

pkg/apisix/upstream.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ func (u *serviceClient) Create(ctx context.Context, obj *v1.Service, shouldCompa
126126
}
127127
url := u.url + "/" + obj.ID
128128
log.Debugw("creating upstream", zap.ByteString("body", body), zap.String("url", url))
129-
130129
resp, err := u.cluster.createResource(ctx, url, "service", body)
131130
if err != nil {
132131
log.Errorf("failed to create upstream: %s", err)

pkg/providers/apisix/apisix_route.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ func (c *apisixRouteController) sync(ctx context.Context, ev *types.Event) error
332332
}
333333
}
334334

335-
log.Debugw("translated ApisixRoute",
335+
log.Infow("translated ApisixRoute",
336336
zap.Any("routes", tctx.Routes),
337337
zap.Any("upstreams", tctx.Services),
338338
zap.Any("apisix_route", ar),

0 commit comments

Comments
 (0)