-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(denylist): edge cached responses #162
Conversation
alanshaw
commented
Jun 12, 2023
- Cache responses for listed CIDs for 1 day
- Cache responses for unlisted CIDs for 1 hour
@@ -8,19 +8,9 @@ import { toDenyListAnchor } from '../src/utils/denylist.js' | |||
*/ | |||
const createTestCid = async (s) => await Hash.of(s, { cidVersion: 1 }) | |||
|
|||
const cidNotInDenyList = await createTestCid('not in denylist') | |||
const cidInDenyList = await createTestCid('asdfasdf') | |||
const cidInDenyListBlockedForLeganReasons = await createTestCid('blocked for legal reasons') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Standard was complaining of the top level await...
@@ -33,7 +33,7 @@ | |||
"pre-commit": "npx lint-staged" | |||
}, | |||
"lint-staged": { | |||
"*.*": "standard" | |||
"*.js": "standard" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just lint the javascripts, not the yaml and json
const headers = options.headers || new Headers() | ||
const noAbortRequestsOnWinner = Boolean(options.noAbortRequestsOnWinner) | ||
const onRaceEnd = options.onRaceEnd || nop | ||
const gatewaySignals = options.gatewaySignals || {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typescript lint made me do this...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ✨
Co-authored-by: Vasco Santos <[email protected]>
🤖 I have created a release *beep* *boop* --- ## [1.1.0](denylist-v1.0.1...denylist-v1.1.0) (2023-06-12) ### Features * **denylist:** edge cached responses ([#162](#162)) ([fc8b9f2](fc8b9f2)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## [1.5.0](ipfs-gateway-race-v1.4.1...ipfs-gateway-race-v1.5.0) (2023-06-12) ### Features * **denylist:** edge cached responses ([#162](#162)) ([fc8b9f2](fc8b9f2)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>