forked from Ivasoft/geovisio-website
Merge branch 'fix/auth-conf-header' into 'main'
fix local api url to auth route + bug header instance without login See merge request geovisio/website!76
This commit is contained in:
@@ -26,9 +26,8 @@ useMeta({
|
||||
<template v-slot:title="{ content }">{{ content }}</template>
|
||||
</metainfo>
|
||||
<Header
|
||||
v-if="authConf.user_profile"
|
||||
:auth-enabled="authConf.enabled"
|
||||
:user-profile-url="authConf.user_profile.url"
|
||||
:user-profile-url="authConf.user_profile ? authConf.user_profile.url : ''"
|
||||
/>
|
||||
<RouterView />
|
||||
</template>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
@click.native="closeModal"
|
||||
/>
|
||||
</li>
|
||||
<li v-if="userProfileUrl" class="logged-link">
|
||||
<li v-if="userProfileUrl.length" class="logged-link">
|
||||
<Link
|
||||
path="/mes-informations"
|
||||
icon="bi bi-person"
|
||||
@@ -114,7 +114,7 @@ const { t } = useI18n()
|
||||
const route = useRoute()
|
||||
defineProps({
|
||||
authEnabled: { type: Boolean, default: true },
|
||||
userProfileUrl: { type: String, default: null }
|
||||
userProfileUrl: { type: String, default: '' }
|
||||
})
|
||||
const list = ref(null)
|
||||
let menuIsClosed = ref<boolean>(true)
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
function getAuthRoute(authRoute: string, nextRoute: string): string {
|
||||
const next = `${location.protocol}//${location.host}${nextRoute}`
|
||||
return `/api/${authRoute}?next_url=${encodeURIComponent(`${next}`)}`
|
||||
return `${
|
||||
import.meta.env.VITE_API_URL
|
||||
}api/${authRoute}?next_url=${encodeURIComponent(`${next}`)}`
|
||||
}
|
||||
|
||||
export { getAuthRoute }
|
||||
|
||||
Reference in New Issue
Block a user