Skip to content

Commit

Permalink
add cache control headers
Browse files Browse the repository at this point in the history
  • Loading branch information
tusharmath committed Mar 12, 2024
1 parent dadf092 commit b3b960e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
12 changes: 0 additions & 12 deletions docs/operators/headers.md

This file was deleted.

8 changes: 6 additions & 2 deletions docs/operators/server.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,13 @@ Always choose non-standard ports, avoiding typical ones like 80 or 8080. Make su

## headers

`headers` contains key-value pairs that are included as default headers in server responses, allowing for consistent header management across all responses.
Allows intelligent configuration of the final response headers that's produced by Tailcall.

The documentation for supported headers is available in [headers](headers.md)
### cacheControl

Activating the `cacheControl` configuration directs Tailcall to send [Cache-Control] headers in its responses. The `max-age` value in the header matches the smallest of the values in the responses Tailcall receives from upstream services. By default, this is `false`, which means Tailcall does not set any header.

[cache-control]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control

```graphql showLineNumbers
schema @server(headers: {cacheControl: true}) {
Expand Down

0 comments on commit b3b960e

Please sign in to comment.