forked from gitea/gitea
Fix ROOT_URL detection for URLs without trailing slash (#20503)
This commit is contained in:
parent
0a32bd56eb
commit
39b2ede930
|
@ -389,7 +389,8 @@ export function initGlobalButtons() {
|
||||||
*/
|
*/
|
||||||
export function checkAppUrl() {
|
export function checkAppUrl() {
|
||||||
const curUrl = window.location.href;
|
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;
|
return;
|
||||||
}
|
}
|
||||||
if (document.querySelector('.page-content.install')) {
|
if (document.querySelector('.page-content.install')) {
|
||||||
|
|
Loading…
Reference in New Issue