1
resposta

CORS quando vai salvar.

Olá!

Quando tento salvar os dados na tabela aparece o erro de CORS, como corrigir?

Access to fetch at 'http://localhost:8000/api/autor' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
1 resposta

ja tentou colocar no fetch um header com

"Access-Control-Allow-Origin": "*"

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software