Publish Toolbox 0.18.1 with local-only Random Tools

This commit is contained in:
2026-09-01 08:32:15 +02:00
parent 08a01d843a
commit ea5f76554a
14 changed files with 47 additions and 54 deletions
+4 -6
View File
@@ -214,14 +214,12 @@ describe('production deployment', () => {
).toHaveLength(1);
});
it('allows RANDOM.ORG only for the explicitly opt-in Random Tools path', () => {
it('keeps application network connections same-origin', () => {
expect(nginxConfig).toMatch(
/map \$uri \$toolbox_connect_sources\s*\{\s*default "'self'";\s*"~\^\/apps\/rand\(\?:\/\|\$\)" "'self' https:\/\/www\.random\.org";\s*\}/mu
/^\s*add_header Content-Security-Policy "[^"]*connect-src 'self';[^"]*" always;$/mu
);
expect(nginxConfig).toMatch(
/^\s*add_header Content-Security-Policy "[^"]*connect-src \$toolbox_connect_sources;[^"]*" always;$/mu
);
expect(nginxConfig.match(/https:\/\/www\.random\.org/gu)).toHaveLength(1);
expect(nginxConfig).not.toContain('$toolbox_connect_sources');
expect(nginxConfig).not.toMatch(/https?:\/\//u);
});
it('quotes nginx regular expressions that contain brace quantifiers', () => {