Skip to content

Commit

Permalink
feat: Rainbow-No-Blockcache is only valid with 'true'
Browse files Browse the repository at this point in the history
  • Loading branch information
aschmahmann committed Jun 25, 2024
1 parent a0b0290 commit 9f87182
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions docs/headers.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,13 @@ See [`RAINBOW_TRACING_AUTH`](./environment-variables.md#rainbow_tracing_auth)
## `Traceparent`

See [`RAINBOW_TRACING_AUTH`](./environment-variables.md#rainbow_tracing_auth)

## `Tracestate`

See [`RAINBOW_TRACING_AUTH`](./environment-variables.md#rainbow_tracing_auth)

## Rainbow-No-Blockcache

If the value is `true` the associated request will skip the local block cache and leverage a separate in-memory block cache for the request.

This header is not respected unless the request has a valid `Authorization` header
2 changes: 1 addition & 1 deletion handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ func setupGatewayHandler(cfg Config, nd *Node, tracingAuth string) (http.Handler
}

// Process cache skipping header
if noBlockCache := request.Header.Get(NoBlockcacheHeader); noBlockCache != "" {
if noBlockCache := request.Header.Get(NoBlockcacheHeader); noBlockCache == "true" {
ds, err := leveldb.NewDatastore("", nil)
if err != nil {
writer.WriteHeader(http.StatusInternalServerError)
Expand Down

0 comments on commit 9f87182

Please sign in to comment.