mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	@@ -1530,7 +1530,7 @@ function initU2FAuth() {
 | 
			
		||||
    }
 | 
			
		||||
    u2fApi.ensureSupport()
 | 
			
		||||
        .then(function () {
 | 
			
		||||
            $.getJSON('/user/u2f/challenge').success(function(req) {
 | 
			
		||||
            $.getJSON(suburl + '/user/u2f/challenge').success(function(req) {
 | 
			
		||||
                u2fApi.sign(req.appId, req.challenge, req.registeredKeys, 30)
 | 
			
		||||
                    .then(u2fSigned)
 | 
			
		||||
                    .catch(function (err) {
 | 
			
		||||
@@ -1543,12 +1543,12 @@ function initU2FAuth() {
 | 
			
		||||
            });
 | 
			
		||||
        }).catch(function () {
 | 
			
		||||
            // Fallback in case browser do not support U2F
 | 
			
		||||
            window.location.href = "/user/two_factor"
 | 
			
		||||
            window.location.href = suburl + "/user/two_factor"
 | 
			
		||||
        })
 | 
			
		||||
}
 | 
			
		||||
function u2fSigned(resp) {
 | 
			
		||||
    $.ajax({
 | 
			
		||||
        url:'/user/u2f/sign',
 | 
			
		||||
        url: suburl + '/user/u2f/sign',
 | 
			
		||||
        type: "POST",
 | 
			
		||||
        headers: {"X-Csrf-Token": csrf},
 | 
			
		||||
        data: JSON.stringify(resp),
 | 
			
		||||
@@ -1565,7 +1565,7 @@ function u2fRegistered(resp) {
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
    $.ajax({
 | 
			
		||||
        url:'/user/settings/security/u2f/register',
 | 
			
		||||
        url: suburl + '/user/settings/security/u2f/register',
 | 
			
		||||
        type: "POST",
 | 
			
		||||
        headers: {"X-Csrf-Token": csrf},
 | 
			
		||||
        data: JSON.stringify(resp),
 | 
			
		||||
@@ -1623,7 +1623,7 @@ function initU2FRegister() {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function u2fRegisterRequest() {
 | 
			
		||||
    $.post("/user/settings/security/u2f/request_register", {
 | 
			
		||||
    $.post(suburl + "/user/settings/security/u2f/request_register", {
 | 
			
		||||
        "_csrf": csrf,
 | 
			
		||||
        "name": $('#nickname').val()
 | 
			
		||||
    }).success(function(req) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user