feat: add unauthenticated /share/attachment/[id] route for shared bill attachments
- Add /share/attachment/.* to public pages in middleware.ts - Create new /share/attachment/[id] route handler for downloading attachments without authentication - Add custom 404 page for missing shared attachments - Update ViewBillCard component to use shared attachment route instead of authenticated route This enables attachment downloads from shared bill pages without requiring user login. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -10,7 +10,7 @@ import { locales, defaultLocale } from '@/app/i18n';
|
||||
import { Session } from 'next-auth';
|
||||
|
||||
// http://localhost:3000/share/location/675c41b227d0df76a35f106e
|
||||
const publicPages = ['/terms', '/policy', '/login', '/share/location/.*', '/share/bill/.*'];
|
||||
const publicPages = ['/terms', '/policy', '/login', '/share/location/.*', '/share/bill/.*', '/share/attachment/.*'];
|
||||
|
||||
const intlMiddleware = createIntlMiddleware({
|
||||
locales,
|
||||
|
||||
Reference in New Issue
Block a user