Skip to content

Commit

Permalink
fix: setting up default tenant
Browse files Browse the repository at this point in the history
  • Loading branch information
gernest committed Mar 4, 2024
1 parent 921f3fb commit 0ca82f4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
5 changes: 2 additions & 3 deletions internal/cluster/http/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ const (
defaultTimeout = 30 * time.Second

// VersionHTTPHeader is the HTTP header key for the version.
VersionHTTPHeader = "X-RQLITE-VERSION"
VersionHTTPHeader = "X-VINCE-VERSION"

// ServedByHTTPHeader is the HTTP header used to report which
// node (by node Raft address) actually served the request if
// it wasn't served by this node.
ServedByHTTPHeader = "X-RQLITE-SERVED-BY"
ServedByHTTPHeader = "X-VINCE-SERVED-BY"

// AllowOriginHeader is the HTTP header for allowing CORS compliant access from certain origins
AllowOriginHeader = "Access-Control-Allow-Origin"
Expand Down Expand Up @@ -931,7 +931,6 @@ func (s *Service) CheckRequestPerm(params QueryParams, perm v1.Credential_Permis
username = params.TenantID()
password = params.BearerToken()
}

return s.creds.AA(username, password, perm)
}

Expand Down
1 change: 1 addition & 0 deletions internal/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ func App() *cli.Command {
GeoipDbPath: c.String("geoipDbPath"),
RetentionPeriod: durationpb.New(c.Duration("retentionPeriod")),
AutoTls: c.Bool("autoTls"),
AuthToken: c.String("authToken"),
Node: &v1.RaftNode{
Id: c.String("nodeId"),
Advertise: c.String("nodeAdv"),
Expand Down
1 change: 0 additions & 1 deletion tools/visitors

This file was deleted.

5 changes: 5 additions & 0 deletions tools/visitors.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export SITE_ID=vinceanalytics.com
export TOKEN=xxxx

curl "http://localhost:8080/api/v1/stats/realtime/visitors?site_id=$SITE_ID" \
-H "Authorization: Bearer ${TOKEN}"

0 comments on commit 0ca82f4

Please sign in to comment.