Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kevinmichaelchen/go-hasura-authentication-webhook
Simple Hasura webhook auth server with time.Sleep to test HTTP caching
https://github.com/kevinmichaelchen/go-hasura-authentication-webhook
Last synced: about 2 months ago
JSON representation
Simple Hasura webhook auth server with time.Sleep to test HTTP caching
- Host: GitHub
- URL: https://github.com/kevinmichaelchen/go-hasura-authentication-webhook
- Owner: kevinmichaelchen
- Created: 2023-01-05T17:41:33.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-05T20:31:38.000Z (about 2 years ago)
- Last Synced: 2024-06-21T02:03:03.483Z (7 months ago)
- Language: Go
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Caching HTTP responses
The [`Cache-Control`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control)
HTTP header field holds directives (instructions) — in both requests and
responses — that control caching in browsers and shared caches (e.g. Proxies,
CDNs).If we send back the header
```
Cache-Control: max-age=604800
```
we're instructing the HTTP client to cache for 604800 seconds (7 days).## Does Hasura cache responses for webhook authentication?
In Hasura, you can defer auth decisions to an external endpoint (i.e., a
webhook).https://hasura.io/docs/latest/auth/authentication/webhook/