sliftutils 1.7.35 → 1.7.36
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/package.json
CHANGED
|
@@ -89,8 +89,10 @@ export async function hostStorageServer(config: HostStorageServerConfig): Promis
|
|
|
89
89
|
SocketFunction.expose(RequireController);
|
|
90
90
|
SocketFunction.expose(RemoteStorageController);
|
|
91
91
|
// Every HTTP path goes through httpEntry: /file/<account>/<bucketName>/... serves public bucket files, everything else serves the access page (the path is the account name, see accessPage.tsx). A full URL, so the page resolves modules from the origin root even when served at /accountName (a relative require would resolve inside the account path).
|
|
92
|
+
// The module path is resolved server-side against its working directory, which is the HOST application's folder - so it is computed from where this file actually is, instead of assuming the storage server runs from inside sliftutils (in a host app it lives under node_modules/sliftutils).
|
|
93
|
+
let accessPagePath = "./" + path.relative(process.cwd(), path.join(__dirname, "accessPage.tsx")).replaceAll("\\", "/");
|
|
92
94
|
SocketFunction.setDefaultHTTPCall(RemoteStorageController, "httpEntry", {
|
|
93
|
-
requireCalls: [`https://${domain}:${port}
|
|
95
|
+
requireCalls: [`https://${domain}:${port}/${accessPagePath}`],
|
|
94
96
|
});
|
|
95
97
|
|
|
96
98
|
// Initial check so a server starting under-limit immediately rejects writes; then keep checking every 15 minutes so recovery (freed disk space) is picked up automatically.
|