feat: add attempting to set instance URL from auth middleware
This commit is contained in:
parent
dd63095526
commit
9f66643b99
1 changed files with 8 additions and 0 deletions
|
@ -33,6 +33,14 @@ export default defineNuxtRouteMiddleware(async (to, from) => {
|
||||||
if (parsed.ApiBaseUrl) {
|
if (parsed.ApiBaseUrl) {
|
||||||
apiBase.value = `${parsed.ApiBaseUrl}/v${apiVersion}`;
|
apiBase.value = `${parsed.ApiBaseUrl}/v${apiVersion}`;
|
||||||
console.log("set apiBase to:", parsed.ApiBaseUrl);
|
console.log("set apiBase to:", parsed.ApiBaseUrl);
|
||||||
|
console.log("hHEYOO");
|
||||||
|
const instanceUrl = useCookie("instance_url");
|
||||||
|
console.log("hHEYOO 2");
|
||||||
|
console.log("instance url:", instanceUrl.value);
|
||||||
|
if (!instanceUrl.value) {
|
||||||
|
instanceUrl.value = `${requestUrl.protocol}//${requestUrl.host}`;
|
||||||
|
console.log("set instance url to:", instanceUrl.value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue