dhruvilxcode / eshop

Your own E Commerce 🛒 Website built using Full Stack Technologies ⚡️ (NextJS, NodeJS, Payment Gateway 💳)
MIT License
8 stars 0 forks source link

Create Frontend using NextJS + TailwindCSS #4

Open dhruvilxcode opened 1 year ago

dhruvilxcode commented 1 year ago

to automatically send the http cookies from frontend to backend you first need to enable the CORS. then in the axios use following options to enable it.

axios.get('api URL here', {
  withCredentials: true
});
dhruvilxcode commented 1 year ago