#abranti

1 messages · Page 1 of 1 (latest)

night epochBOT
wild elbow
#

Hi 👋

What error are you seeing?

glass kraken
#

The docs say we need to use iframe with allow-top-navigation

#

[Report Only] Refused to load the script '<URL>' because it violates the following Content Security Policy directive: "script-src 'none'". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

#

[Report Only] Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'none'".

19[Report Only] Refused to connect to '<URL>' because it violates the following Content Security Policy directive: "connect-src 'none'".

wild elbow
#

And your pricing table is not loading?

glass kraken
#

yes

wild elbow
#

Can you share the HTML code where you have the pricing table?

glass kraken
#
<iframe sandbox="allow-top-navigation">
<script async src="https://js.stripe.com/v3/pricing-table.js"></script>
<stripe-pricing-table pricing-table-id="prctbl_1NsNibDmGGo1DisCQQrsW4ta"
publishable-key="pk_live_51NUn9HDmGGo1DisCdvpjUTEgLYqNbBqLOQr7NtR0mNMnU79apIQcz9ACjJJ8Hlj2paxIK164LZanFAmK0Vp5V7XZ00k7FC2YnT">
</stripe-pricing-table>
</iframe>
wild elbow
glass kraken
#

Basically it says it doesn't work without the allow-top-navigation attribute which implies it works with this attribute

wild elbow
glass kraken
#

Still not working

#

code:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Security-Policy" content="frame-src https://js.stripe.com; script-src https://js.stripe.com">
    <title>Title</title>
</head>
<body>

<iframe sandbox="allow-top-navigation">
    <script async unsafe-inline src="https://js.stripe.com/v3/pricing-table.js"></script>
    <stripe-pricing-table pricing-table-id="prctbl_1NsNibDmGGo1DisCQQrsW4ta"
                          publishable-key="pk_live_51NUn9HDmGGo1DisCdvpjUTEgLYqNbBqLOQr7NtR0mNMnU79apIQcz9ACjJJ8Hlj2paxIK164LZanFAmK0Vp5V7XZ00k7FC2YnT">
    </stripe-pricing-table>
</iframe>

</body>
</html>
#

Did you get it working?

wild elbow
#

What do you mean?

glass kraken
wild elbow
#

Okay, I was able to repro the failure

glass kraken
#

Even tried with the unsafe-inline flag

#

No error appears on the console.. just an empty iframe 🤔

wild elbow
#

Yeah, mine too

glass kraken
#

maybe we have to escalate this.. right?

wild elbow
#

Let me check with a few of my colleagues first. It's a little busy so I cannot do all the testing I would like.

glass kraken
#

Ok thank you.

#

I will have to go now but will check this thread soon

wild elbow
#

We close threads after some time of inactivity but you can still review the answers I will post and you can always come back to ask new questions in the main channel.

glass kraken
#

Ok thanks - if you can't solve it will you open a ticket or something?

wild elbow
#

If I cannot find you an answer I will recommend you write an email to Support and include the code snippet you shared here. That will create a ticket and get it escalated to staff like me who handle these kinds of issues.

glass kraken
#

ok

wild elbow
#

Okay we got this to work by using the following <iframe> sandbox attributes

<iframe src="http://localhost:3000/table.html" 

sandbox="allow-top-navigation allow-top-navigation-by-user-activation allow-scripts allow-same-origin allow-presentation allow-popups-to-escape-sandbox allow-popups allow-pointer-lock allow-orientation-lock allow-modals allow-forms">
    
</iframe>