mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-09-08 19:27:18 +02:00
Added more CSP urls for bluesky
This commit is contained in:
@@ -13,16 +13,16 @@ server:
|
|||||||
csp:
|
csp:
|
||||||
whitelist:
|
whitelist:
|
||||||
connect-src:
|
connect-src:
|
||||||
- "{{ WEB_PROTOCOL }}://{{ BLUESKY_API_DOMAIN }}"
|
- "{{ WEB_PROTOCOL }}://<< defaults_applications[web-app-bluesky].server.domains.canonical.api >>"
|
||||||
- https://plc.directory
|
- "https://plc.directory"
|
||||||
- https://bsky.social
|
- "https://bsky.social"
|
||||||
- https://api.bsky.app
|
- "https://api.bsky.app"
|
||||||
- https://public.api.bsky.app
|
- "https://public.api.bsky.app"
|
||||||
- https://events.bsky.app
|
- "https://events.bsky.app"
|
||||||
- https://statsigapi.net
|
- "https://statsigapi.net"
|
||||||
- https://ip.bsky.app
|
- "https://ip.bsky.app"
|
||||||
- wss://bsky.network
|
- "wss://bsky.network"
|
||||||
- wss://*.bsky.app
|
- "wss://*.bsky.app"
|
||||||
docker:
|
docker:
|
||||||
services:
|
services:
|
||||||
database:
|
database:
|
||||||
|
@@ -25,7 +25,7 @@ class TestCspConfigurationConsistency(unittest.TestCase):
|
|||||||
Accept entries that are:
|
Accept entries that are:
|
||||||
- Jinja expressions (contain '{{' and '}}')
|
- Jinja expressions (contain '{{' and '}}')
|
||||||
- Data or Blob URIs (start with 'data:' or 'blob:')
|
- Data or Blob URIs (start with 'data:' or 'blob:')
|
||||||
- HTTP/HTTPS URLs
|
- HTTP/HTTPS/WS/WSS URLs
|
||||||
"""
|
"""
|
||||||
if '{{' in entry and '}}' in entry:
|
if '{{' in entry and '}}' in entry:
|
||||||
return True
|
return True
|
||||||
@@ -34,7 +34,7 @@ class TestCspConfigurationConsistency(unittest.TestCase):
|
|||||||
if entry == '*':
|
if entry == '*':
|
||||||
return True
|
return True
|
||||||
parsed = urlparse(entry)
|
parsed = urlparse(entry)
|
||||||
return parsed.scheme in ('http', 'https') and bool(parsed.netloc)
|
return parsed.scheme in ('http', 'https','ws', 'wss') and bool(parsed.netloc)
|
||||||
|
|
||||||
def test_csp_configuration_structure(self):
|
def test_csp_configuration_structure(self):
|
||||||
"""
|
"""
|
||||||
|
Reference in New Issue
Block a user