diff --git a/relay/application.py b/relay/application.py index abe8258..e312692 100644 --- a/relay/application.py +++ b/relay/application.py @@ -333,7 +333,7 @@ async def handle_response_headers(request: web.Request, handler: Callable) -> Re resp.headers['Server'] = 'ActivityRelay' # Still have to figure out how csp headers work - if resp.content_type == 'text/html': + if resp.content_type == 'text/html' and not request.path.startswith("/api"): resp.headers['Content-Security-Policy'] = get_csp(request) if not request.app['dev'] and request.path.endswith(('.css', '.js')):