johannschopplich / nuxt-kql

🫧 Kirby's Query Language API for Nuxt
https://nuxt-kql.byjohann.dev
MIT License
42 stars 2 forks source link

Ignore self-signed certificate on KQL requests #17

Closed pixelpaulaus closed 2 months ago

pixelpaulaus commented 2 months ago

Describe the feature

i have a self signed certificate on the kirby instance. And when my nuxt tries to get the data, it is stopped due to the untrusted self signed certificate. It would be great to have an option to ignore these untrusted certificates

Additional information

Final checks

johannschopplich commented 2 months ago

I see. That's not an issue with the module or Nuxt itself, but rather your server engine. Depending on your deployment target (Node, workers, etc.), you have to allow unsigned certificates.

For example, in Node this would look as follows to run the production server:

NODE_TLS_REJECT_UNAUTHORIZED=0 node .output/server/index.mjs

I don't have a solution for the Cloudflare worker environment, but I'm sure there is some information online. Feel free to share your solution here for other users!