Merged
Conversation
… minor orthograph
Updated the basicAuth middleware to pass event context into `useRuntimeConfig` composable, ensuring proper access to private settings.
fix(nonce): override user-defined nonce values with Nuxt Image
Add basic rate limiter whitelist (specific IPs only)
Refactor basicAuth middleware to use runtime configuration correctly
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This file contains hidden or 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
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.
This pull request introduces a new feature to the rate limiter middleware by adding a whitelist option, along with several related changes to the codebase and documentation.
New Feature: Whitelist Option for Rate Limiter
Rate Limiter Configuration:
whiteListproperty to theRateLimitertype, allowing specific IP addresses to bypass rate limiting. (docs/content/3.middleware/1.rate-limiter.md,src/types/middlewares.ts,src/defaultConfig.ts) [1] [2] [3]whiteListproperty. (docs/content/3.middleware/1.rate-limiter.md)Implementation in Configuration:
whiteListoption in various configuration files. (playground/nuxt.config.ts,test/fixtures/rateLimiter/nuxt.config.ts) [1] [2]Middleware Updates:
src/runtime/server/middleware/rateLimiter.ts)Testing:
test/rateLimiter.test.ts)test/fixtures/rateLimiter/pages/whitelistBase.vue,test/fixtures/rateLimiter/pages/whitelistEmpty.vue,test/fixtures/rateLimiter/pages/whitelistNotListed.vue) [1] [2] [3]Additional Changes
Security Configuration:
securityConfigwas not correctly initialized in the basic authentication middleware. (src/runtime/server/middleware/basicAuth.ts)Nonce Handling:
src/runtime/nitro/plugins/40-cspSsrNonce.ts) [1] [2]These changes enhance the flexibility and functionality of the rate limiter middleware, allowing certain IP addresses to bypass rate limiting, and improve the overall security configuration and nonce handling in the application.
Resolves #595
Resolves #586
Resolves #517