#CSP issues on Chrome browsers with Adobe Embed API

1 messages · Page 1 of 1 (latest)

glad dust
#

Using the adobe embed API to try present a PDF in my page, working just fine in firefox, safari, but cant get it to work in chrome. Looks to be CSP related? Has anyone used this api and/or has a solution or idea of how to get around this?

#
return (
  <div>
      <div id="adobe-dc-view" className="w-full h-full"></div>
      <script src="https://documentservices.adobe.com/view-sdk/viewer.js"></script>
      <script type="text/javascript" dangerouslySetInnerHTML={{__html: `
            document.addEventListener("adobe_dc_view_sdk.ready", function(){ 
                var adobeDCView = new AdobeDC.View({clientId: "${data.adobeKey}", divId: "adobe-dc-view"});
                adobeDCView.previewFile({
                    content:{location: {url: "/access/` + ramsDocument?.fileName + `"}},
                    metaData:{fileName: "Bodea Brochure.pdf"}
                }, {});
            });`}}></script>
  </div>
tranquil current
#

something is trying to set a cookie but is not setting the Same-Site so Chrome defaulted it to Lax

#

if it only happens when you add that script from Adobe then most likely the script is trying to do that

glad dust
#

i see, do adobe have to do something about that? Surprised theres not more people online talking about the issue. Adobe does set around 20-25 cookies.

#

its pretty.... heavy

tranquil current
#

they should fix the way they set the cookie yes

glad dust
#

does remix set a content security policy anywhere? I cant find one

tranquil current
#

it doesn't by default

#

this is Chrome

#

chrome makes all cookies without SameSite as Lax by default

haughty kestrel
#

Why not let the browser handle the pdf file itself?

#

I seen others able to keep the layout by putting the pdf under an ifrmae.

glad dust
#

is it possible to set one?

haughty kestrel