NextJS Cors problem with Axios
Unanswered
French Bulldog posted this in #help-forum
French BulldogOP
I've been having the same problem for 3 days now, i've searched everywhere for fixes about this bug, none of them seemed to work and others are too complicated to read up on, can someone help me with it?
19 Replies
@Ray what is that url for?
French BulldogOP
Google App Script request
American black bear
@French Bulldog Are you calling the request in server/client ? IIRC you can't call Appscript from client side.
and it's not related to Next.js
@American black bear <@757840200855584850> Are you calling the request in server/client ? IIRC you can't call Appscript from client side.
French BulldogOP
i am calling Appscript through a NextJS Script/Page
@French Bulldog i am calling Appscript through a NextJS Script/Page
American black bear
Yeah, but the component is client or server? I think it's client cause it's showing up on brower's console
American black bear
You can't call appscript from client side IIRC, I faced this error previously on react, and I didn't find any solution, I searched for days
Since you are using Next.js, you can call it on server side, and it would work IG
@American black bear Since you are using Next.js, you can call it on server side, and it would work IG
French BulldogOP
How does one call it from Server side?
@French Bulldog *How does one call it from Server side?*
American black bear
For what purpose you are calling the appscript, on form submission?
@American black bear For what purpose you are calling the appscript, on form submission?
French BulldogOP
That's right, i have a form and i use the Appscript as backend.
i upload the form details to the backend and it takes care of it
American black bear
You can use Server Actions
French BulldogOP
Server actions?
American black bear
If you have any doubts how to implement it, ask here
French BulldogOP
Will check on it, thanks!
American black bear
😄