I hereby claim:
- I am adam-janis on github.
- I am adamjanis (https://keybase.io/adamjanis) on keybase.
- I have a public key ASDpf6ddBzBm6V86JqpFwyB_FYJucNw_DuzVnXxDTDoTAwo
To claim this, I am signing this object:
import { createMiddleware } from 'hono/factory'; | |
import { HonoEnv } from '../routers/api'; | |
import * as jose from 'jose'; | |
const zeroTrustAccount = "<account-name>" | |
const zeroTrustAppAud = "<application-audience>" | |
const JWKS = jose.createRemoteJWKSet(new URL(`https://${zeroTrustAccount}.cloudflareaccess.com/cdn-cgi/access/certs`)); | |
export const cloudflareAccess = createMiddleware<HonoEnv>(async (c, next) => { | |
const jwt = c.req.header('cf-access-jwt-assertion'); |
// GQL API docs => https://developers.cloudflare.com/analytics/graphql-api/ | |
// tldr; => POST https://api.cloudflare.com/client/v4/graphql | |
const requestBody = { | |
query: ` | |
query RequestsAndDataTransferByHostname($zoneTag: string, $filter: filter) { | |
viewer { | |
zones(filter: {zoneTag: $zoneTag}) { | |
healthCheckEventsAdaptiveGroups(limit: 10000, filter: $filter) { | |
dimensions { |
// This script is running on https://eidam.dev | |
// change dnsWithPolyworkCustomDomainCname to your CNAME record set to provided record by Polywork | |
// note: you cannot use Polywork record directly | |
const dnsWithPolyworkCustomDomainCname = "polywork-origin.eidam.dev" | |
// change link to your list of links | |
const links = [ | |
{link: "https://github.com/eidam", name: "🍴 https://github.com/eidam"}, | |
{link: "https://twitter.com/adam_janis", name: "🐤 https://twitter.com/adam_janis"}, | |
{link: "https://statusflare.com", name: "📈 https://statusflare.com"}, |
### Keybase proof | |
I hereby claim: | |
* I am eidam on github. | |
* I am adamjanis (https://keybase.io/adamjanis) on keybase. | |
* I have a public key ASDpf6ddBzBm6V86JqpFwyB_FYJucNw_DuzVnXxDTDoTAwo | |
To claim this, I am signing this object: |
Request after | Origin status | max-age=5 | stale-while-revalidate=30 | stale-if-error=60 | |
---|---|---|---|---|---|
1 sec | Up | cache hit | - | - | |
1 sec | Down | cache hit | - | - | |
10 sec | Up | miss, revalidate | stale cache, refresh | - | |
10 sec | Down | miss, revalidate | stale cache, refresh | - | |
45 sec | Up | miss, revalidate | miss, refresh | - | |
45 sec | Down | miss, revalidate | miss, error | stale cache | |
65 sec | Up | miss, revalidate | miss, refresh | - | |
65 sec | Down | miss, revalidate | miss, error | error |
I hereby claim:
To claim this, I am signing this object: