diff --git a/docs/PORTAINER.md b/docs/PORTAINER.md index b9a0bbd..1bb83a0 100644 --- a/docs/PORTAINER.md +++ b/docs/PORTAINER.md @@ -93,6 +93,24 @@ as `dtf_prod_database_url_v1`, then place only those names in the corresponding Credential values must never be entered into Git, `portainer.env`, or Gitea workflow variables. +**R2 CORS.** The Site uploads artwork straight from the browser to the bucket +with presigned `PUT` requests, so the bucket must allow the Site's origin. +Without it the preflight is refused (403) and the Site shows "NetworkError +when attempting to fetch resource" at checkout (found 2026-09-28). In the +Cloudflare dashboard, R2 → the bucket → Settings → CORS policy: + +```json +[ + { + "AllowedOrigins": ["https://", "https://"], + "AllowedMethods": ["PUT", "GET", "HEAD"], + "AllowedHeaders": ["content-type"], + "ExposeHeaders": ["ETag"], + "MaxAgeSeconds": 3600 + } +] +``` + ## 3. Create the stack once In Portainer select **Stacks → Add stack → Git repository**: diff --git a/web/index.html b/web/index.html index 83c12f4..2cd04c3 100644 --- a/web/index.html +++ b/web/index.html @@ -668,7 +668,6 @@ h1 em{font-style:normal;color:var(--laranja)} .cbts button:disabled{opacity:.4;cursor:not-allowed} .cbts .sec{background:#fff;color:var(--tx);border:1px solid var(--linha);font-weight:600} .cbts .sec:hover{background:#fff;border-color:var(--laranja);color:var(--laranja)} -.carr .obs{font-size:11px;color:var(--fraco);margin-top:11px;line-height:1.5} .carro{position:relative;margin-top:22px} .trilho{display:flex;gap:14px;overflow-x:auto;scroll-snap-type:x mandatory; @@ -1192,7 +1191,6 @@ footer a:hover{color:var(--laranja2)}

-

@@ -1205,9 +1203,6 @@ footer a:hover{color:var(--laranja2)} -

A nota fiscal sai no CNPJ informado. O arquivo fica guardado por 30 dias; - depois disso, um novo pedido precisa do arquivo de novo. O histórico do pedido - continua disponível na sua conta.

diff --git a/web/site-flow.js b/web/site-flow.js index 3a2250f..c31e34f 100644 --- a/web/site-flow.js +++ b/web/site-flow.js @@ -104,10 +104,6 @@ function pintaEntrega(){ $('cep').classList.toggle('on', entrega.tipo==='frete'); $('vFrete').textContent = entrega.tipo!=='frete' ? '—' : entrega.cotado ? rs(entrega.valor) : 'a cotar'; - $('avisoE').innerHTML = entrega.tipo==='retira' - ? 'DTF é impresso depois que você paga. Avisamos no WhatsApp quando estiver '+ - 'pronto para retirar — não venha antes do aviso.' - : ''; $('bPagar').disabled = !entrega.cotado || !clienteOk() || !enderecoOk() || !cartPodeEnviar(); $('eEnd').textContent = entrega.tipo==='frete' && entrega.cotado && !enderecoOk() ? 'Preencha o endereço de entrega para seguir.' : '';