Publish Toolbox 0.18.1 with local-only Random Tools
This commit is contained in:
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user