mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-27 06:03:51 +03:00
Fix ROOT_URL detection for URLs without trailing slash (#20502)
This commit is contained in:
parent
b899b2df5a
commit
158f2746b8
1 changed files with 2 additions and 1 deletions
|
@ -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')) {
|
||||
|
|
Loading…
Reference in a new issue