fix: Add explicit public route with AllowAnonymous for ShareCard
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:
parent
707d725f4a
commit
2ebe6e5b3e
@ -393,6 +393,15 @@ app.UseAuthentication();
|
|||||||
app.UseAuthorization();
|
app.UseAuthorization();
|
||||||
|
|
||||||
// Configure routing
|
// 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(
|
app.MapControllerRoute(
|
||||||
name: "admin",
|
name: "admin",
|
||||||
pattern: "Admin/{controller=Dashboard}/{action=Index}/{id?}",
|
pattern: "Admin/{controller=Dashboard}/{action=Index}/{id?}",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user