mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Fix ROOT_URL detection for URLs without trailing slash (#20502)
This commit is contained in:
		@@ -389,7 +389,8 @@ export function initGlobalButtons() {
 | 
			
		||||
 */
 | 
			
		||||
export function checkAppUrl() {
 | 
			
		||||
  const curUrl = window.location.href;
 | 
			
		||||
  if (curUrl.startsWith(appUrl)) {
 | 
			
		||||
  // some users visit "https://domain/gitea" while appUrl is "https://domain/gitea/", there should be no warning
 | 
			
		||||
  if (curUrl.startsWith(appUrl) || `${curUrl}/` === appUrl) {
 | 
			
		||||
    return;
 | 
			
		||||
  }
 | 
			
		||||
  if (document.querySelector('.page-content.install')) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user