geido opened a new pull request, #28260:
URL: https://github.com/apache/superset/pull/28260

   ### SUMMARY
   A dashboard can have an image attached in the markdown component that is 
hosted on a server that does not have proper CORS settings. Due to limitations 
of html2canvas, both PDF and image download will fail in a Dashboard.
   
   For reference from html2canvas:
   > All the images that the script uses need to reside under the [same 
origin](http://en.wikipedia.org/wiki/Same_origin_policy) for it to be able to 
read them without the assistance of a 
[proxy](https://html2canvas.hertzen.com/proxy/). Similarly, if you have other 
canvas elements on the page, which have been tainted with cross-origin content, 
they will become dirty and no longer readable by html2canvas. 
   
   This PR introduces an `img_proxy` view that can be used to overcome the CORS 
issues.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   N.A.
   
   ### TESTING INSTRUCTIONS
   1. Attach an image in the dashboard that does not have proper CORS settings
   2. Download the dashboard as PDF or image
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
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