mirror of
https://github.com/bretzel-app/crumbs.git
synced 2026-10-13 04:06:57 +02:00
feat: add share API endpoints and in-memory rate limiting
- POST/DELETE /api/notes/[id]/share for creating/revoking public links - GET /api/shared/[token] for fetching shared note data (no auth) - GET /api/shared/[token]/attachment/[attachmentId] for public images - Add /s/ and /api/shared to PUBLIC_PATHS in auth middleware - Add IP-based rate limiter (60 req/min) for public endpoints Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
committed by
Fred Cabassut
co-authored by
Claude Opus 4.6
parent
90996cc72d
commit
4ffa34afa0
+3
-1
@@ -8,7 +8,9 @@ const PUBLIC_PATHS = [
|
||||
'/setup',
|
||||
'/api/auth/login',
|
||||
'/api/auth/setup',
|
||||
'/api/auth/oauth'
|
||||
'/api/auth/oauth',
|
||||
'/s/',
|
||||
'/api/shared'
|
||||
];
|
||||
|
||||
export const handle: Handle = async ({ event, resolve }) => {
|
||||
|
||||
Reference in New Issue
Block a user