openvibers/openvibe.network Commits
openvibe.link: proxy /machines and /pair to Link's app (#667)
Changes
@@@ -186,8 +186,8 @@ server {location ~* ^/(metrics|internal)(/|$) { return 404; }-- # Link's page, its installer redirect, its Markdown twin and the agent files.-- location ~ ^/(|install|index\.md|llms\.txt|llms-full\.txt|robots\.txt|sitemap\.xml|\.well-known/agent\.json)$ {++ # Link's page, its installer redirect, its machines and pairing signposts, its Markdown twin and the agent files.++ location ~ ^/(|install|machines|pair|index\.md|llms\.txt|llms-full\.txt|robots\.txt|sitemap\.xml|\.well-known/agent\.json)$ {limit_except GET HEAD { deny all; }proxy_pass http://127.0.0.1:4000;proxy_http_version 1.1;@@@ -57,6 +57,10 @@ const SHAPED = {assert.strictEqual(broken.stale, true, 'and it is marked as the last one read');assert.ok(broken.installUrl.startsWith('https://github.com/OpenVibers/OpenVibe.Node/releases/download/'), 'the installer link still works');++ // The vhost must send /machines and /pair to the app (which signposts them), not the catch-all to Network.++ const vhost = fs.readFileSync(path.join(__dirname, '..', 'deploy', 'nginx', 'parked-domains.conf'), 'utf8');++ assert.ok(/location ~ \^\/\(\|install\|machines\|pair\|/.test(vhost), 'the vhost proxies /machines and /pair to the Link app');++// ── The page: OpenVibe Link, and every fact the Node page had ──const html = page.render({ release: first, releaseId: 'rel_test' });assert.ok(html.includes('<title>OpenVibe Link: your machines, connected</title>'), 'the title is Link\'s');
@@ -186,8 +186,8 @@ server {
@@ -186,8 +186,8 @@ server {
location ~* ^/(metrics|internal)(/|$) { return 404; }
location ~* ^/(metrics|internal)(/|$) { return 404; }
- # Link's page, its installer redirect, its Markdown twin and the agent files.
- location ~ ^/(|install|index\.md|llms\.txt|llms-full\.txt|robots\.txt|sitemap\.xml|\.well-known/agent\.json)$ {
+ # Link's page, its installer redirect, its machines and pairing signposts, its Markdown twin and the agent files.
+ location ~ ^/(|install|machines|pair|index\.md|llms\.txt|llms-full\.txt|robots\.txt|sitemap\.xml|\.well-known/agent\.json)$ {
limit_except GET HEAD { deny all; }
limit_except GET HEAD { deny all; }
proxy_pass http://127.0.0.1:4000;
proxy_pass http://127.0.0.1:4000;
proxy_http_version 1.1;
proxy_http_version 1.1;
@@ -57,6 +57,10 @@ const SHAPED = {
@@ -57,6 +57,10 @@ const SHAPED = {
assert.strictEqual(broken.stale, true, 'and it is marked as the last one read');
assert.strictEqual(broken.stale, true, 'and it is marked as the last one read');
assert.ok(broken.installUrl.startsWith('https://github.com/OpenVibers/OpenVibe.Node/releases/download/'), 'the installer link still works');
assert.ok(broken.installUrl.startsWith('https://github.com/OpenVibers/OpenVibe.Node/releases/download/'), 'the installer link still works');
+ // The vhost must send /machines and /pair to the app (which signposts them), not the catch-all to Network.
+ const vhost = fs.readFileSync(path.join(__dirname, '..', 'deploy', 'nginx', 'parked-domains.conf'), 'utf8');
+ assert.ok(/location ~ \^\/\(\|install\|machines\|pair\|/.test(vhost), 'the vhost proxies /machines and /pair to the Link app');
+
// ── The page: OpenVibe Link, and every fact the Node page had ──
// ── The page: OpenVibe Link, and every fact the Node page had ──
const html = page.render({ release: first, releaseId: 'rel_test' });
const html = page.render({ release: first, releaseId: 'rel_test' });
assert.ok(html.includes('<title>OpenVibe Link: your machines, connected</title>'), 'the title is Link\'s');
assert.ok(html.includes('<title>OpenVibe Link: your machines, connected</title>'), 'the title is Link\'s');