Skip to content

Bug: Custom favicon and font blocked by CSP (font-src 'self' data:) #1964

Closed

Description

@yannickmonney

Problem

A custom-branded favicon/font fails in production with a CSP violation (works locally):

Loading the font '' violates the following Content Security Policy directive: "font-src 'self' data:". The action has been blocked.

Current behavior

  • CSP built in services/platform/server.ts buildContentSecurityPolicy() (:372-402), with font-src: ["'self'", 'data:'] (:390).
  • Branding assets are served from /branding/images/:orgSlug/:filename (:615-637) — a same-origin path that nonetheless isn't matched (confirm the exact failing URL/origin).

Proposed change

Allow branding-served fonts (and confirm favicons) under the CSP — e.g. add the branding asset origin/path to font-src (and img-src if needed), or serve fonts as data:. Confirm the failing URL's origin first to choose the minimal correct fix.

Acceptance criteria

  • Custom favicon and font load in production with no CSP violation.
  • CSP remains as strict as possible otherwise.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions