Skip to content

arcjet/example-astro

Repository files navigation

Arcjet Logo

Deploy with Vercel     Deploy to Netlify

Arcjet Astro example app

Arcjet helps developers protect their apps in just a few lines of code. Bot detection. Rate limiting. Email validation. Attack protection. Data redaction. A developer-first approach to security.

This is an example Astro application demonstrating the use of multiple features.

Features

  • Signup form protection uses Arcjet's server-side email verification configured to block disposable providers and ensure that the domain has a valid MX record. It also includes rate limiting and bot protection to prevent automated abuse.
  • Bot protection shows how a page can be protected from automated clients.
  • Rate limiting shows the use of different rate limit configurations depending on the authenticated user. A logged-in user can make more requests than an anonymous user.
  • Attack protection demonstrates Arcjet Shield, which detects suspicious behavior, such as SQL injection and cross-site scripting attacks.
  • Sensitive info protects against clients sending you sensitive information such as PII that you do not wish to handle.

Run locally

  1. Register for a free Arcjet account.

  2. Install dependencies:

npm ci
  1. Rename .env.local.example to .env.local and add your Arcjet key.

  2. Start the dev server

npm run dev
  1. Open http://localhost:4321 in your browser.

Need help?

Check out the docs, contact support, or join our Discord server.

Stack

Contributing

All development for Arcjet examples is done in the arcjet/examples repository.

You are welcome to open an issue here or in arcjet/examples directly. However, please direct all pull requests to arcjet/examples. Take a look at our contributing guide for more information.

About

An example Astro application protected by Arcjet.

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published