Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

207
Visualizações
HTML: Allow-Same-Origin on iframe, but I am not using iframes

i am stuck here for a while now.

I have this simple button in vanilla

                <td><button class="button_accept" onclick="acceptInvite(event, 0)" type="submit">accept</button></td>

It fires this script:

async function LoadPaymentController(){
  var stripe = Stripe('testKey');
// Call your backend to create the Checkout Session
fetch('/create-checkout-session', {
  method: 'POST',
})
.then(function(response) {
  return response.json();
})
.then(function(session) {
  return stripe.redirectToCheckout({ sessionId: session.id });
})
.then(function(result) {
  // If `redirectToCheckout` fails due to a browser or network
  // error, you should display the localized error message to your
  // customer using `error.message`.
  if (result.error) {
    alert(result.error.message);
  }
});
}

But whenever I click this, firefox tells me that:

Stripe.js requires 'allow-same-origin' if sandboxed.

I spoke to a dev from the stripe team and I googled my ass off and it always says that I have to add the sandbox="allow-same-origin" attribute to my iframe.

But I am not using an iframe.

Adding this attribute to everything else also didnt work at all.

What am I missing?

I tried:

  <meta http-equiv="Content-Security-Policy" content="allow-same-origin">

  <script src="https://js.stripe.com/v3/"></script>

To no avail

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda