dosubot[bot] commented on issue #30901:
URL: https://github.com/apache/superset/issues/30901#issuecomment-2470502269

   <!-- Greeting -->
   Hey @acolgecen! 👋 I'm here to help you with any bugs, questions, or becoming 
a contributor. Let's squash those bugs together!
   
   <!-- Answer -->
   The issue you're experiencing with custom fonts not rendering in Superset's 
UI might be related to the Content Security Policy (CSP) settings. Superset's 
`TALISMAN_CONFIG` includes a CSP that restricts the sources from which styles 
can be loaded. By default, the `style-src` directive allows styles only from 
`'self'` and `'unsafe-inline'`, which would block external font URLs like those 
from Google Fonts unless explicitly allowed 
<sup>[[1]](https://github.com/apache/superset/blob/master/superset/config.py)</sup>.
   
   To resolve this, you can modify the `TALISMAN_CONFIG` in your 
`superset_config.py` to include the Google Fonts URL in the `style-src` 
directive. Here's an example of how you might adjust the configuration:
   
   ```python
   TALISMAN_CONFIG = {
       "content_security_policy": {
           "style-src": [
               "'self'",
               "'unsafe-inline'",
               "https://fonts.googleapis.com";,
               "https://fonts.gstatic.com";
           ],
       },
   }
   ```
   
   After making these changes, restart Superset and perform a hard refresh in 
your browser to see if the custom fonts are applied correctly.
   
   
   <!-- Dosu Comment Footer -->
   *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to