fix: Add explicit public route with AllowAnonymous for ShareCard
All checks were successful
Build and Deploy LittleShop / Deploy to Production VPS (Manual Only) (push) Has been skipped
Build and Deploy LittleShop / Deploy to Pre-Production (CT109) (push) Successful in 1m5s

Configure routing to explicitly allow anonymous access to the
PublicBots controller routes before the main admin routes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
SysAdmin 2025-12-01 23:41:35 +00:00
parent 707d725f4a
commit 2ebe6e5b3e

View File

@ -393,6 +393,15 @@ app.UseAuthentication();
app.UseAuthorization();
// Configure routing
// Public ShareCard routes (anonymous access)
app.MapControllerRoute(
name: "publicBots",
pattern: "Admin/PublicBots/{action}/{id?}",
defaults: new { area = "Admin", controller = "PublicBots" }
).AllowAnonymous();
// Admin routes (require authentication)
app.MapControllerRoute(
name: "admin",
pattern: "Admin/{controller=Dashboard}/{action=Index}/{id?}",