Skip to content

Commit bcdf527

Browse files
committed
fix: remove updateCredit endpoint from general auth
1 parent bc1048e commit bcdf527

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

apps/api/main.go

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,9 @@ package main
22

33
import (
44
"bytes"
5-
"connectrpc.com/grpcreflect"
6-
"connectrpc.com/vanguard"
75
"context"
86
"errors"
97
"fmt"
10-
"github.com/arl/statsviz"
11-
sentrygin "github.com/getsentry/sentry-go/gin"
12-
"github.com/gin-contrib/cors"
13-
"github.com/gin-contrib/static"
14-
openapi2 "go.dot.industries/brease/openapi"
15-
trace2 "go.dot.industries/brease/trace"
16-
"go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin"
178
"io"
189
"log"
1910
"net/http"
@@ -22,6 +13,16 @@ import (
2213
"strings"
2314
"time"
2415

16+
"connectrpc.com/grpcreflect"
17+
"connectrpc.com/vanguard"
18+
"github.com/arl/statsviz"
19+
sentrygin "github.com/getsentry/sentry-go/gin"
20+
"github.com/gin-contrib/cors"
21+
"github.com/gin-contrib/static"
22+
openapi2 "go.dot.industries/brease/openapi"
23+
trace2 "go.dot.industries/brease/trace"
24+
"go.opentelemetry.io/contrib/instrumentation/github.com/gin-gonic/gin/otelgin"
25+
2526
"buf.build/gen/go/dot/brease/connectrpc/go/brease/auth/v1/authv1connect"
2627
"buf.build/gen/go/dot/brease/connectrpc/go/brease/context/v1/contextv1connect"
2728
"connectrpc.com/connect"
@@ -179,7 +180,7 @@ func newApp(db storage.Database, logger *zap.Logger) *gin.Engine {
179180
//r.Use(auth.Middleware(logger, []*regexp.Regexp{regexp.MustCompile("^/(brease.*|v1.*)$")}))
180181
r.Use(auditlog.Middleware(
181182
auditLogStore(logger),
182-
auditlog.WithSensitivePaths([]*regexp.Regexp{regexp.MustCompile("^/(token|refreshToken)$")}),
183+
auditlog.WithSensitivePaths([]*regexp.Regexp{regexp.MustCompile("^/(token|refreshToken|updateCredit)$")}),
183184
auditlog.WithIgnorePaths([]*regexp.Regexp{regexp.MustCompile("^/(stats)$")}),
184185
auditlog.WithIDExtractor(func(c *gin.Context) (contextID, ownerID, userID string) {
185186
ownerID = c.GetString(auth.ContextOrgKey)

0 commit comments

Comments
 (0)