absolute instead of relative url fix
This commit is contained in:
		| @@ -1,9 +1,9 @@ | ||||
| const currentUrl = window.location.href; | ||||
|  | ||||
| import { ab2str, exportedKeyToPem, pemToKey, genKey } from "./ecc.js"; | ||||
| import { add_div_register_text } from "./registertext.js"; | ||||
|  | ||||
| export async function registerConfirm() { | ||||
|     const apiUrl = `${currentUrl}account/register`; | ||||
|     const apiUrl = `/account/register`; | ||||
|     const inputFieldSharedSecret = document.getElementById("sharedsecret"); | ||||
|     const inputFieldPublicKey = document.getElementById("publickey"); | ||||
|     let pubkey = null; | ||||
| @@ -46,7 +46,7 @@ export async function registerConfirm() { | ||||
| } | ||||
|  | ||||
| export async function loginConfirm() { | ||||
|     const apiUrl = `${currentUrl}account/login`; | ||||
|     const apiUrl = `/account/login`; | ||||
|     const inputFieldPrivateKey = document.getElementById("privatekey"); | ||||
|     const response = await fetch(apiUrl, { method: 'GET' }); | ||||
|     if (!response.ok) { | ||||
| @@ -71,7 +71,7 @@ export async function loginConfirm() { | ||||
|     let signatureString = ab2str(signature); | ||||
|     let signatureBase64 = window.btoa(signatureString); | ||||
|  | ||||
|     const verifyApiUrl = `${currentUrl}account/verify-challenge`; | ||||
|     const verifyApiUrl = `/account/verify-challenge`; | ||||
|     const verifyResponse = await fetch(verifyApiUrl, { | ||||
|         method: 'POST', | ||||
|         headers: { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user