Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content Security Policy doesn't contain font-src blob: #3005

Open
lyonzy opened this issue Feb 19, 2024 · 1 comment
Open

Content Security Policy doesn't contain font-src blob: #3005

lyonzy opened this issue Feb 19, 2024 · 1 comment

Comments

@lyonzy
Copy link

lyonzy commented Feb 19, 2024

Describe the bug/problem

I have epubs that use fonts from blobs, and the text didn't show (and there were console errors) when it loaded. I fixed it by changing the CSP to allow blob: for fonts (font-src 'self' data: blob:). Happy to provide repro instructions and screenshots but hopefully this is a quick one and doesn't need them.

Environment (please complete the following information):
LinuxServer container on Kubernetes.

Additional context
Here's the Traefik Middleware I used as a workaround:

apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
  name: csp-middleware
  namespace: calibre-web
spec:
  headers:
    contentSecurityPolicy: "default-src 'self' 'unsafe-inline' 'unsafe-eval' blob:; font-src 'self' data: blob:; img-src 'self' data: blob: https://*; style-src-elem 'self' blob: 'unsafe-inline';"
@OzzieIsaacs
Copy link
Collaborator

The newest nightly version should cover this usecase now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants