mirror of
https://github.com/zammad/zammad
synced 2026-05-24 09:48:36 +00:00
21 lines
505 B
TypeScript
21 lines
505 B
TypeScript
// Copyright (C) 2012-2026 Zammad Foundation, https://zammad-foundation.org/
|
|
|
|
import { computed } from 'vue'
|
|
|
|
import { useApplicationStore } from '#shared/stores/application.ts'
|
|
|
|
export const useBaseUrl = () => {
|
|
const application = useApplicationStore()
|
|
|
|
const baseUrl = computed(() => {
|
|
const { http_type: httpType, fqdn } = application.config
|
|
|
|
if (!fqdn || fqdn === 'zammad.example.com') return window.location.origin
|
|
|
|
return `${httpType}://${fqdn}`
|
|
})
|
|
|
|
return {
|
|
baseUrl,
|
|
}
|
|
}
|