runlocal 0.5.0 → 0.5.1
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.js +2 -2
- package/package.json +1 -1
package/lib.js
CHANGED
|
@@ -224,13 +224,13 @@ function createConnection(options) {
|
|
|
224
224
|
if (event === "tunnel_created") {
|
|
225
225
|
const inspectUrl = payload.url.replace(/^https?:\/\/[^/]+/, (origin) => {
|
|
226
226
|
// Convert subdomain URL to main domain /inspect/ URL
|
|
227
|
-
// e.g., https://fuzzy-tiger.runlocal.eu → https://runlocal.eu/inspect/fuzzy-tiger
|
|
227
|
+
// e.g., https://fuzzy-tiger.runlocal.eu → https://runlocal.eu/inspect/fuzzy-tiger/<token>
|
|
228
228
|
const parts = new URL(origin);
|
|
229
229
|
const hostParts = parts.hostname.split(".");
|
|
230
230
|
if (hostParts.length > 2) {
|
|
231
231
|
parts.hostname = hostParts.slice(1).join(".");
|
|
232
232
|
}
|
|
233
|
-
return `${parts.origin}/inspect/${payload.subdomain}`;
|
|
233
|
+
return `${parts.origin}/inspect/${payload.subdomain}/${payload.inspect_token}`;
|
|
234
234
|
});
|
|
235
235
|
|
|
236
236
|
log("");
|