javascript-solid-server 0.0.125 → 0.0.126
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.
|
@@ -335,7 +335,10 @@
|
|
|
335
335
|
"Bash(TORRENT=/home/melvin/.claude/projects/-home-melvin-remote-github-com-JavaScriptSolidServer-JavaScriptSolidServer/a05da419-92b7-4056-93b8-e97b2035d4ae/tool-results/webfetch-1774004425803-fce7mx.bin npx -y parse-torrent $TORRENT)",
|
|
336
336
|
"Bash(gh issue:*)",
|
|
337
337
|
"Bash(sed -i 's|Settings/|settings/|g' src/server.js src/handlers/container.js src/webid/profile.js)",
|
|
338
|
-
"Bash(sed -i 's|// Settings folder|// settings folder|' src/handlers/container.js)"
|
|
338
|
+
"Bash(sed -i 's|// Settings folder|// settings folder|' src/handlers/container.js)",
|
|
339
|
+
"WebFetch(domain:www.x402.org)",
|
|
340
|
+
"Bash(jss start:*)",
|
|
341
|
+
"Read(//tmp/**)"
|
|
339
342
|
]
|
|
340
343
|
}
|
|
341
344
|
}
|
package/package.json
CHANGED
package/src/auth/middleware.js
CHANGED
|
@@ -24,6 +24,8 @@ import { generateDatabrowserHtml, generateModuleDatabrowserHtml } from '../mashl
|
|
|
24
24
|
* @returns {string} Normalized resource URL
|
|
25
25
|
*/
|
|
26
26
|
function buildResourceUrl(request, urlPath) {
|
|
27
|
+
// Use request.headers.host (includes port) instead of request.hostname (strips port)
|
|
28
|
+
const host = request.headers.host || request.hostname;
|
|
27
29
|
if (request.subdomainsEnabled && request.baseDomain &&
|
|
28
30
|
request.hostname === request.baseDomain && !request.podName) {
|
|
29
31
|
const pathMatch = urlPath.match(/^\/([^/]+)(\/.*)?$/);
|
|
@@ -33,7 +35,7 @@ function buildResourceUrl(request, urlPath) {
|
|
|
33
35
|
return `${request.protocol}://${podName}.${request.baseDomain}${remainder}`;
|
|
34
36
|
}
|
|
35
37
|
}
|
|
36
|
-
return `${request.protocol}://${
|
|
38
|
+
return `${request.protocol}://${host}${urlPath}`;
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
/**
|
|
@@ -180,7 +182,7 @@ function getErrorPage(statusCode, isAuthenticated, request) {
|
|
|
180
182
|
? "This resource is protected. You'll need to sign in to continue."
|
|
181
183
|
: "You're signed in, but you don't have permission to view this resource.";
|
|
182
184
|
|
|
183
|
-
const baseUrl = `${request.protocol}://${request.hostname}`;
|
|
185
|
+
const baseUrl = `${request.protocol}://${request.headers.host || request.hostname}`;
|
|
184
186
|
|
|
185
187
|
return `<!DOCTYPE html>
|
|
186
188
|
<html lang="en">
|