fix: promote arcjet cloudflare proxy fix to main#12
Merged
Conversation
- add NestExpressApplication type and app.set trust proxy true in main.ts so express reads the real client ip from cloudflare forwarded headers - create src/common/guards/arcjet-optional.guard.ts extending ArcjetGuard with SkipArcjet decorator support for exempting specific routes - update arcjet.module.ts to replace proxies 10.0.0.0/8 with cloudflare() helper, type aj as ArcjetNest instead of any, and swap ArcjetGuard for ArcjetOptionalGuard - add SkipArcjet decorator to root GET / in app.controller.ts to skip arcjet on render health check probes which have no client ip - add live demo url and cold-start note to README.md
Adds trust proxy true to Express via NestExpressApplication so Cloudflare forwarded headers are respected, replaces the static CIDR proxy config in arcjet.module.ts with the cloudflare() helper, types the aj instance as ArcjetNest, creates ArcjetOptionalGuard extending ArcjetGuard with SkipArcjet decorator support and swaps it in as the global guard, adds SkipArcjet to the root GET / health check route that carries no client IP, and adds the live demo url and cold-start note to the readme.
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
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.
Summary
Promotes the Arcjet Cloudflare proxy fix, ArcjetOptionalGuard, and health check skip from develop into main.
What's Changed
Why
The IP warning fix needs to be on main to take effect on the Render production deployment.