@@ -565,42 +565,43 @@ var (
565565		"." ,
566566		".." ,
567567		".well-known" ,
568- 		"admin" ,
569- 		"api" ,
570- 		"assets" ,
571- 		"attachments" ,
572- 		"avatar" ,
573- 		"avatars" ,
568+ 
569+ 		"api" ,     // gitea api 
570+ 		"metrics" , // prometheus metrics api 
571+ 		"v2" ,      // container registry api 
572+ 
573+ 		"assets" ,      // static asset files 
574+ 		"attachments" , // issue attachments 
575+ 
576+ 		"avatar" ,  // avatar by email hash 
577+ 		"avatars" , // user avatars by file name 
578+ 		"repo-avatars" ,
579+ 
574580		"captcha" ,
575- 		"commits" ,
576- 		"debug" ,
577- 		"error" ,
581+ 		"login" , // oauth2 login 
582+ 		"org" ,   // org create/manage, or "/org/{org}", BUT if an org is named as "invite" then it goes wrong 
583+ 		"repo" ,  // repo create/migrate, etc 
584+ 		"user" ,  // user login/activate/settings, etc 
585+ 
578586		"explore" ,
579- 		"favicon.ico" ,
580- 		"ghost" ,
581587		"issues" ,
582- 		"login" ,
583- 		"manifest.json" ,
584- 		"metrics" ,
588+ 		"pulls" ,
585589		"milestones" ,
586- 		"new" ,
587590		"notifications" ,
588- 		"org" ,
589- 		"pulls" ,
590- 		"raw" ,
591- 		"repo" ,
592- 		"repo-avatars" ,
593- 		"robots.txt" ,
594- 		"search" ,
595- 		"serviceworker.js" ,
596- 		"ssh_info" ,
591+ 
592+ 		"favicon.ico" ,
593+ 		"manifest.json" , // web app manifests 
594+ 		"robots.txt" ,    // search engine robots 
595+ 		"sitemap.xml" ,   // search engine sitemap 
596+ 		"ssh_info" ,      // agit info 
597597		"swagger.v1.json" ,
598- 		 "user" , 
599- 		"v2"  , 
600- 		"gitea-actions" ,
598+ 
599+ 		"ghost"  ,          // reserved name for deleted users (id: -1) 
600+ 		"gitea-actions" ,  // gitea builtin user (id: -2) 
601601	}
602602
603- 	// DON'T ADD ANY NEW STUFF, WE SOLVE THIS WITH `/user/{obj}` PATHS! 
603+ 	// These names are reserved for user accounts: user's keys, user's rss feed, user's avatar, etc. 
604+ 	// DO NOT add any new stuff! The paths with these names are processed by `/{username}` handler (UsernameSubRoute) manually. 
604605	reservedUserPatterns  =  []string {"*.keys" , "*.gpg" , "*.rss" , "*.atom" , "*.png" }
605606)
606607
0 commit comments