-
Notifications
You must be signed in to change notification settings - Fork 4
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
Confirm Rate Limiting Works Properly, Small Improvements to Crawler Verification Script #537
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Correctly initialize cache entries and handle TTL expiration logic. - Ensure accurate request counts and timestamps through clear conditional checks.
Enhanced user data management by introducing better token refresh mechanisms and updated local storage checks. Refactored to handle more use cases, including direct bootstraps and failing over to retries. - Updated config SSR_API_TIMEOUT to 30000 for consistency. - Improved test coverage for user data and refresh logic scenarios.
- Split session validation into clear, separate checks for improved readability and maintainability. - Enhance logging with additional context, including request path and session details. - Re-enable `botCheck` middleware to identify bots during session initialization.
Refactor `getServerSideProps` to utilize React Query's prefetching for multiple pages. * Implement `dehydrate` and `prefetchQuery` for server-side data fetching. * Replace `withDetailsPage` HOC with direct async function. * Handle API errors and logging within GSSP.
Changed the log level to be dynamically set based on the LOG_LEVEL environment variable, defaulting to 'info'. Also included the process ID (PID) in the logger's base information for better traceability. - Adjusted log level configuration - Added PID to logger base information
- **Tests:** Temporarily skip all pager-related tests in `pager.spec.ts`. - **Config:** Enhance Chromium launch options for better GPU utilization and remove redundant `storybook` web server configuration in `playwright.config.ts`.
* Refactor inputs to use `defaultValue` instead of `value` to prevent uncontrolled to controlled component warnings. * Add resolver mock handlers and corresponding response data for improved testing capabilities. * Skip 'UI' test in `AuthorAffiliations.test.tsx` and remove console log from `api.test.ts`.Update input handling and add resolver mocks and Fixup Tests
* Added logging of request headers to enhance debugging. * Updated the rate limiting response to return a JSON error message with a 429 status code instead of redirecting.
The Google Tag Manager ID has been changed from an environment variable to a hardcoded value.
- Removed redundant comments explaining default values for TTL and request count in rate limit settings. - The code is now cleaner and adheres to DRY principles.
Refactor `isBot` API handlers to improve type definitions, logging, and documentation. Added extensive comments for clarity, cache PTR records, and updated Google bot DNS domains. Enhanced bot detection middleware to handle bot classification and session updates better. - Improved type safety and added detailed JSDocs. - Cached PTR records for performance enhancement. - Updated middleware to handle bot detection and session management more robustly.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #537 +/- ##
========================================
- Coverage 46.8% 46.3% -0.5%
========================================
Files 427 427
Lines 45492 46135 +643
Branches 628 631 +3
========================================
+ Hits 21289 21345 +56
- Misses 24191 24780 +589
+ Partials 12 10 -2
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.