Skip to content
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

feat: Added rate limit + security headers. #581

Merged
merged 3 commits into from
Oct 9, 2024

Conversation

charles-marion
Copy link
Collaborator

Issue #, if available:

Description of changes:

  • Upgrade the cloudfront CDK Construct. CloudFrontWebDistribution is deprecated
  • Add Security headers
  • Added WAF to throttled the Appsync request per IP. Added one rule specific for sendQuery

Testing

  • Verified throttling from both cloudfront and appsync by call many time the LLM
  • Verified the front end still works with federation, image upload. The content ContentSecurityPolicy header is strict to prevent using unexpected resources.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

lib/chatbot-api/index.ts Outdated Show resolved Hide resolved
lib/chatbot-api/index.ts Outdated Show resolved Hide resolved
lib/shared/index.ts Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants