SchnapsterDog / nuxt-chatgpt

ChatGPT integration for Nuxt 3
https://www.buymeacoffee.com/schnapsterdog
MIT License
157 stars 20 forks source link

Feedback #4

Closed danielroe closed 1 year ago

danielroe commented 1 year ago

This looks amazing! A couple of points to mention, in case you find it helpful:

  1. You do not need to stringify the body of $fetch requests, or set content-type. This will be done automatically.
  2. Because you set the public key of runtimeConfig, the user's API key is exposed to the client.

    ⚠️ This should probably be fixed as a matter of urgency.

    https://github.com/SchnapsterDog/nuxt-chatgpt/blob/master/src/module.ts#L50C5-L52. (You just need to update that same line to remove public.)

SchnapsterDog commented 1 year ago

This looks amazing! A couple of points to mention, in case you find it helpful:

  1. You do not need to stringify the body of $fetch requests, or set content-type. This will be done automatically.
  2. Because you set the public key of runtimeConfig, the user's API key is exposed to the client. ⚠️ This should probably be fixed as a matter of urgency. https://github.com/SchnapsterDog/nuxt-chatgpt/blob/master/src/module.ts#L50C5-L52. (You just need to update that same line to remove public.)

Thanks a lot of the feedback. Really appreciate your time. I will merge the request and going to bump new version for it.