@akanjs/base 0.9.40 → 0.9.41
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/cjs/src/baseEnv.js +1 -1
- package/esm/src/baseEnv.js +1 -1
- package/package.json +1 -1
package/cjs/src/baseEnv.js
CHANGED
|
@@ -60,7 +60,7 @@ const serverHost = process.env.SERVER_HOST ?? (operationMode === "local" ? typeo
|
|
|
60
60
|
const serverPort = parseInt(
|
|
61
61
|
process.env.NEXT_PUBLIC_SERVER_PORT ?? (operationMode === "local" || side === "server" ? "8080" : "443")
|
|
62
62
|
);
|
|
63
|
-
const serverHttpProtocol = side === "client" ? window.location.protocol : "http:";
|
|
63
|
+
const serverHttpProtocol = process.env.SERVER_HTTP_PROTOCOL ?? (operationMode === "local" ? side === "client" ? window.location.protocol : "http:" : renderMode === "csr" ? "https:" : side === "client" ? window.location.protocol : "http:");
|
|
64
64
|
const serverHttpUri = `${serverHttpProtocol}//${serverHost}${serverPort === 443 ? "" : `:${serverPort}`}/backend`;
|
|
65
65
|
const serverGraphqlUri = `${serverHttpUri}/graphql`;
|
|
66
66
|
const serverWsProtocol = serverHttpProtocol === "http:" ? "ws:" : "wss:";
|
package/esm/src/baseEnv.js
CHANGED
|
@@ -37,7 +37,7 @@ const serverHost = process.env.SERVER_HOST ?? (operationMode === "local" ? typeo
|
|
|
37
37
|
const serverPort = parseInt(
|
|
38
38
|
process.env.NEXT_PUBLIC_SERVER_PORT ?? (operationMode === "local" || side === "server" ? "8080" : "443")
|
|
39
39
|
);
|
|
40
|
-
const serverHttpProtocol = side === "client" ? window.location.protocol : "http:";
|
|
40
|
+
const serverHttpProtocol = process.env.SERVER_HTTP_PROTOCOL ?? (operationMode === "local" ? side === "client" ? window.location.protocol : "http:" : renderMode === "csr" ? "https:" : side === "client" ? window.location.protocol : "http:");
|
|
41
41
|
const serverHttpUri = `${serverHttpProtocol}//${serverHost}${serverPort === 443 ? "" : `:${serverPort}`}/backend`;
|
|
42
42
|
const serverGraphqlUri = `${serverHttpUri}/graphql`;
|
|
43
43
|
const serverWsProtocol = serverHttpProtocol === "http:" ? "ws:" : "wss:";
|