Overview
This page collects 7 code snippets related to security for Elysia. Browse below to find the perfect solution for your needs.
Snippets by Category
Plugins
Bearer Token Plugin
Bearer token extraction from multiple sources
npx hanma add elysia-bearer --framework elysia
Static Files Plugin
Static file serving with caching and SPA support
npx hanma add elysia-static --framework elysia
HTML Plugin
HTML response helpers for server-side rendering
npx hanma add elysia-html --framework elysia
Middleware
Rate Limiter
In-memory rate limiting with sliding window algorithm
npx hanma add elysia-rate-limiter --framework elysia
Security Headers
Security headers middleware with CSP, HSTS, and more
npx hanma add elysia-security-headers --framework elysia
Request ID
Request ID tracing for distributed systems
npx hanma add elysia-request-id --framework elysia
Frequently Asked Questions
How do I implement security in Elysia?
Browse the snippets above and select the one that best fits your needs. Each snippet includes installation instructions and usage examples.
Are these snippets production-ready?
Yes, all snippets are designed for production use. Review and adapt to your specific requirements before deployment.
Can I use these with Elysia?
Yes, these snippets are specifically designed and tested for Elysia.