diff options
Diffstat (limited to 'client/src/app/helpers')
-rw-r--r-- | client/src/app/helpers/utils/url.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/client/src/app/helpers/utils/url.ts b/client/src/app/helpers/utils/url.ts index b3cded8f4..08c27e3c1 100644 --- a/client/src/app/helpers/utils/url.ts +++ b/client/src/app/helpers/utils/url.ts | |||
@@ -13,6 +13,10 @@ function getAbsoluteAPIUrl () { | |||
13 | return absoluteAPIUrl | 13 | return absoluteAPIUrl |
14 | } | 14 | } |
15 | 15 | ||
16 | function getAPIHost () { | ||
17 | return new URL(getAbsoluteAPIUrl()).host | ||
18 | } | ||
19 | |||
16 | function getAbsoluteEmbedUrl () { | 20 | function getAbsoluteEmbedUrl () { |
17 | let absoluteEmbedUrl = environment.originServerUrl | 21 | let absoluteEmbedUrl = environment.originServerUrl |
18 | if (!absoluteEmbedUrl) { | 22 | if (!absoluteEmbedUrl) { |
@@ -52,5 +56,6 @@ function objectToFormData (obj: any, form?: FormData, namespace?: string) { | |||
52 | export { | 56 | export { |
53 | objectToFormData, | 57 | objectToFormData, |
54 | getAbsoluteAPIUrl, | 58 | getAbsoluteAPIUrl, |
59 | getAPIHost, | ||
55 | getAbsoluteEmbedUrl | 60 | getAbsoluteEmbedUrl |
56 | } | 61 | } |