-
Notifications
You must be signed in to change notification settings - Fork 115
Open
Open
Copy link
Labels
hacktoberfest-acceptedlevel 110 points10 pointsrecodethis is label for leaderboardthis is label for leaderboard
Milestone
Description
Summary
- Remove client-side token access; accept token via
constructor
orsetAuthToken()
(server-side only). Update README with instantiation instructions:new GitHubService(process.env.GITHUB_TOKEN)
. - Add ETag /
If-None-Match
support and store ETags in cache meta. Conditional GET reduces API usage and avoids hitting rate limits. fetchWithRetry
now accepts custom headers and handles304 Not Modified
responses. Cache now stores{ data, etags, lastUpdated }
.
Why
Exposing tokens in client-side code risks leaking credentials and causing abuse. Using conditional requests via ETag reduces bandwidth and GitHub API rate consumption.
Developer notes
- Instantiate server-side with:
const svc = new GitHubService(process.env.GITHUB_TOKEN);
- Do not set tokens on
window
in production. - Cache meta now includes ETags (keyed by endpoint) and
lastUpdated
for freshness checks.
Metadata
Metadata
Assignees
Labels
hacktoberfest-acceptedlevel 110 points10 pointsrecodethis is label for leaderboardthis is label for leaderboard
Type
Projects
Status
Todo