Skip to content

Commit c8324fd

Browse files
Allow the shared footer logo through CSP (#272)
Co-authored-by: Anthony Ettinger <anthony@profullstack.com>
1 parent 3e19ddb commit c8324fd

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

‎src/server.mjs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export function createApp({
6868
'X-Content-Type-Options': 'nosniff',
6969
'Referrer-Policy': 'strict-origin-when-cross-origin',
7070
'Cache-Control': 'no-store',
71-
'Content-Security-Policy': `default-src 'self'; script-src 'self' https://crawlproof.com ${FOOTER_SCRIPT_SRC}; style-src 'self'; img-src 'self' data: https://built.indie.pit.world https://pwamart.com; connect-src 'self' https://crawlproof.com https://pit.world; object-src 'none'; base-uri 'none'; frame-ancestors 'none'; form-action 'self' https://pit.world`,
71+
'Content-Security-Policy': `default-src 'self'; script-src 'self' https://crawlproof.com ${FOOTER_SCRIPT_SRC}; style-src 'self'; img-src 'self' data: https://built.indie.pit.world https://pwamart.com https://profullstack.com; connect-src 'self' https://crawlproof.com https://pit.world; object-src 'none'; base-uri 'none'; frame-ancestors 'none'; form-action 'self' https://pit.world`,
7272
'Permissions-Policy': 'camera=(), microphone=(), geolocation=()',
7373
});
7474
const railwayHealth =

‎test/net-hosting.test.mjs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ test('an active W3BS name page serves its shell assets and links navigation to t
4949
assert.match(page.body, /<h1>mint\.agent<\/h1>/);
5050
assert.match(page.body, /href="http:\/\/localhost:3000\/net"/);
5151
assert.doesNotMatch(page.body, /<a\b[^>]*href="\/(?!\/)/);
52+
assert.match(page.headers['content-security-policy'], /img-src[^;]*https:\/\/profullstack\.com/);
5253

5354
for (const [path, contentType] of [
5455
['/assets/style.css', 'text/css'],

0 commit comments

Comments
 (0)