@jupyter/collaboration 4.1.0 → 4.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/sharedlink.js +4 -4
- package/package.json +1 -1
package/lib/sharedlink.js
CHANGED
|
@@ -29,11 +29,11 @@ export async function showSharedLinkDialog({ translator }) {
|
|
|
29
29
|
serverOwner = PageConfig.getOption('hubServerUser');
|
|
30
30
|
serverName = PageConfig.getOption('hubServerName');
|
|
31
31
|
// Prepare the Hub API URL
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const
|
|
32
|
+
// hubHost is the full Origin (`proto://hostname:port`)
|
|
33
|
+
// or an empty string, making hubApiUrl an absolute path on the current origin
|
|
34
|
+
const hubHost = PageConfig.getOption('hubHost') || '';
|
|
35
35
|
const prefix = PageConfig.getOption('hubPrefix');
|
|
36
|
-
hubApiUrl = `${
|
|
36
|
+
hubApiUrl = `${hubHost}${prefix}api`;
|
|
37
37
|
// Check Hub version for share compatibility (>= 5.0)
|
|
38
38
|
const response = await fetch(hubApiUrl, {
|
|
39
39
|
// A GET request on base API url returns the Hub version
|