public api route blocked by preflights CORS OPTIONS
Unanswered
Boykin Spaniel posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/4.png)
Boykin SpanielOP
Hello,
I want to create a public API route accessible in POST. I modified my next.config.js to add the headers and fix CORS. But the addition of headers is done twice in the POST response. How to do ?
I want to create a public API route accessible in POST. I modified my next.config.js to add the headers and fix CORS. But the addition of headers is done twice in the POST response. How to do ?
![Image](https://cdn.discordapp.com/attachments/1202563764298448926/1202563764470419466/image.png?ex=65cde9c8&is=65bb74c8&hm=41bda8e732f0e3b3a1961abed8d1deade64ad7f9442338bb2282dfbdc0242410&)
![Image](https://cdn.discordapp.com/attachments/1202563764298448926/1202563764755636224/image.png?ex=65cde9c8&is=65bb74c8&hm=07910f057d759b62e5a2ee51fb08cbb5d3148c5f4bbeb49ef3074f54cb132f02&)
![Image](https://cdn.discordapp.com/attachments/1202563764298448926/1202563765002833920/image.png?ex=65cde9c8&is=65bb74c8&hm=ff2bf38220305cf348094a49fcbbd410afa6219fcffacd78e3fd7dbbfda41e81&)