From 2ebe6e5b3ea34b7a83fe9d92da233c54061cf7bd Mon Sep 17 00:00:00 2001 From: SysAdmin Date: Mon, 1 Dec 2025 23:41:35 +0000 Subject: [PATCH] fix: Add explicit public route with AllowAnonymous for ShareCard MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- LittleShop/Program.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/LittleShop/Program.cs b/LittleShop/Program.cs index ea1ff91..b26baf7 100644 --- a/LittleShop/Program.cs +++ b/LittleShop/Program.cs @@ -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?}",