joshuaclausen commented on issue #26102:
URL: https://github.com/apache/superset/issues/26102#issuecomment-2524633555

   I got it working.  In my case I wanted to embed PowerBI workbooks that had 
been published to the web for public consumption.
   
   You need to override the following vars in the superst_config_docker.py file:
   
   ```
   HTML_SANITIZATION_SCHEMA_EXTENSIONS
   
   TALISMAN_CONFIG
   ```
   
   
   Here is what I needed to add to superst_config_docker.py (if you're running 
in docker):
   
   ```
   If you wanted to allow iframes in Superset dashboard Text Elements with 
content coming from PowerBI, add the following to superset_config_docker.py (if 
you are running in docker):
   # allow adding <iframe> tags to the text element in dashboards
   # https://github.com/apache/superset/discussions/27064
   # note you also have to add the desired remote load locations to the Content 
Security Policy in the TALISMAN_CONFIG var
   HTML_SANITIZATION_SCHEMA_EXTENSIONS = {
     "attributes": {
       "*": ["style","className"],
       "iframe": ["src"]
     },
     "tagNames": ["style","iframe"],
   }
   
   
   # allow loading content in iframes from powerbi (workbooks that have been 
published to the web)
   # this is the content security policy that allows content to be loaded from 
app.powerbi.com
   TALISMAN_CONFIG = {
       "content_security_policy": {
           "src": [
               "'self'",
               "https://app.powerbi.com";,
           ],
       }
   }
   ```


-- 
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: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to