vicious-gold
vicious-gold6mo ago

how to fix ngrok CORS error?

I paid for ngrok and was issued a fixed domain. CORS occurs when calling from my local ngrok domain API.
const customergroupsResponse = await fetch(`${process.env.NEXT_PUBLIC_CAFE24_API_URL}/customergroups`, {
headers: {
'Content-Type': 'application/json',
},
})
const customergroupsResponse = await fetch(`${process.env.NEXT_PUBLIC_CAFE24_API_URL}/customergroups`, {
headers: {
'Content-Type': 'application/json',
},
})
2 Replies
kapa.ai
kapa.ai6mo ago
Hi @florent. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Hmm, I don't know enough to give you a confident answer yet. The information extracts provided do not contain specific details on how to fix CORS errors with ngrok. However, CORS issues generally arise due to server-side settings. You might need to configure your server to allow requests from your ngrok domain. For more specific guidance, you may want to refer to ngrok's official documentation or the documentation of the server you're using. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai6mo ago
<@1184365192482652173> kapa.ai is still learning and improving, please let us know how it did by reacting below