-
Notifications
You must be signed in to change notification settings - Fork 0
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
cleanup #20
base: main
Are you sure you want to change the base?
cleanup #20
Conversation
marfoldi
commented
Sep 25, 2023
•
edited
Loading
edited
- Some cleanup in "src/utils/normalize-request.ts"
- Add dependabot
- Add linter
- Publish to GitHub packages
cf: { | ||
// NOTE: cf is Enterprise only feature |
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.
@samkahchiin I did not find in the documentation that this would be an enterprise-only feature, maybe it is publicly available now?
response = new Response(response.body, response); | ||
response.headers.set('edge-cache-ttl', `${edgeCacheTtl}`) | ||
if (edgeCacheTtl > 0) { // Only set the header if edgeCacheTtl is set | ||
response.headers.set('edge-cache-ttl', `${edgeCacheTtl}`); |
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.
Do we want to set this to 0 if not defined?
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.
The whole point of such a repo is to have sane defaults for all projects, i.e. ideally, we can always use this project without any options set at all, because we have great defaults for everything.
What would be a great default for caching?
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.
You're right, I'm just wondering whether it wouldn't be unexpected that everything is getting cached let's say for a day. It would definitely be needed to add CircleCi --> Purge Cloudflare cache on deploy
for every project as well.
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.
agreed. Purging the cache after deploy should be in the standardized CircleCi config file :)
accountId?: string | ||
zoneId?: string |
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.
These are unused, leaving them here as optional properties, one might find it helpful to identify deployments in their worker code....
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.
Thanks! Left a few suggestions & questions -- @marfoldi PTAL
response = new Response(response.body, response); | ||
response.headers.set('edge-cache-ttl', `${edgeCacheTtl}`) | ||
if (edgeCacheTtl > 0) { // Only set the header if edgeCacheTtl is set | ||
response.headers.set('edge-cache-ttl', `${edgeCacheTtl}`); |
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.
The whole point of such a repo is to have sane defaults for all projects, i.e. ideally, we can always use this project without any options set at all, because we have great defaults for everything.
What would be a great default for caching?
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.
Great thanks!