9 articles tagged #security on hackpile.dev.
- How to Save the Brain Before You Squash the Body
Extract GPS and camera data with exifr before compression. Sanitize EXIF, store metadata in your database, not in public files.
- Presigned Uploads, the Database, and the Lifecycle
Wire the encoded variants and LQIP into object storage and a database. Presigned PUTs, per-variant retry, transactional DB writes, and orphan cleanup.
- Production Hardening
Harden your ad system for production: database indexing, Redis-backed frequency capping, rate limiting, HTML sanitisation, SSRF prevention, and GDPR compliance.
- Universal vs Server Load Functions
Learn the difference between +page.ts and +page.server.ts, when each runs, what each can access, and how to choose the right one.
- Real Authentication in SvelteKit with better-auth
Step-by-step guide to integrating better-auth in SvelteKit: setup, schema, hooks, client, and login/logout UI. No ORM required.
- {@html ...}
Master Svelte 5's `@html` tag for safe raw HTML rendering. Learn XSS prevention, DOMPurify, styling, and CMS content handling.
- Creating Empty Maps Without Properties in JavaScript
Learn when and why to use Object.create(null) for safe dictionaries in Svelte 5 and SvelteKit applications, with 8 practical examples.
- Authentication Architecture with Context
Build a runnable Svelte 5 auth system with session cookies, role-based permissions, server route guards, and context-powered access control.
- CSP Support for Hydratable
Learn how to use nonces and hashes with Svelte 5 hydratable function to secure server-rendered applications.