@nocobase/cli 2.1.4-test.3 → 2.1.4-test.4
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.
|
@@ -2071,11 +2071,6 @@ function runPromptCatalogWebUIImpl(options) {
|
|
|
2071
2071
|
return page;
|
|
2072
2072
|
};
|
|
2073
2073
|
server = createServer((req, res) => {
|
|
2074
|
-
if (!req.socket.remoteAddress ||
|
|
2075
|
-
!['127.0.0.1', '::1', '::ffff:127.0.0.1'].includes(req.socket.remoteAddress)) {
|
|
2076
|
-
res.writeHead(403).end();
|
|
2077
|
-
return;
|
|
2078
|
-
}
|
|
2079
2074
|
if (req.method === 'GET' && (req.url === '/' || req.url === '')) {
|
|
2080
2075
|
const addr = server?.address();
|
|
2081
2076
|
const port = typeof addr === 'object' && addr ? Number(addr.port) : 0;
|
|
@@ -2212,7 +2207,7 @@ function runPromptCatalogWebUIImpl(options) {
|
|
|
2212
2207
|
}
|
|
2213
2208
|
res.writeHead(404).end();
|
|
2214
2209
|
});
|
|
2215
|
-
server.listen(options.port ?? 0,
|
|
2210
|
+
server.listen(options.port ?? 0, '0.0.0.0', () => {
|
|
2216
2211
|
const addr = server?.address();
|
|
2217
2212
|
if (typeof addr !== 'object' || !addr) {
|
|
2218
2213
|
rejectAndClose(new Error('Failed to bind HTTP server'));
|