mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 10:59:59 +00:00
The applications lookup returns the raw domains map that never receives
onion injection, so on an onion node CANONICAL_DOMAIN stayed clearnet
while the app itself rode onion (SOCKS proxy set). isOnionTarget() then
returned false: onion skips never fired and timeout scaling stayed at
clearnet levels. lookup('domain') resolves through the injected map and
is byte-identical on clearnet (single-entry canonical).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
35 lines
1.1 KiB
JavaScript
35 lines
1.1 KiB
JavaScript
const { test, expect } = require("@playwright/test");
|
|
|
|
const {
|
|
assertCspMetaParity,
|
|
assertCspResponseHeader,
|
|
expectNoCspViolations,
|
|
gotoOnion,
|
|
} = require("./personas");
|
|
|
|
exports.register = function (shared) {
|
|
test("openwebui enforces Content-Security-Policy and exposes canonical domain from domain lookup", async ({
|
|
page,
|
|
}) => {
|
|
const diagnostics = shared.attachDiagnostics(page);
|
|
|
|
const response = await gotoOnion(page, `${shared.env.openwebuiBaseUrl}/`);
|
|
expect(response, "Expected openwebui landing response").toBeTruthy();
|
|
expect(
|
|
response.status(),
|
|
"Expected openwebui landing response to be successful"
|
|
).toBeLessThan(400);
|
|
|
|
const directives = assertCspResponseHeader(response, "openwebui landing");
|
|
await assertCspMetaParity(page, directives, "openwebui landing");
|
|
|
|
const documentUrl = response.url();
|
|
expect(
|
|
documentUrl.includes(shared.env.canonicalDomain),
|
|
`Expected canonical domain "${shared.env.canonicalDomain}" to back the openwebui URL`
|
|
).toBe(true);
|
|
|
|
await expectNoCspViolations(page, diagnostics, "openwebui landing");
|
|
});
|
|
};
|