Closed sebastiantiede closed 1 year ago
Thanks for the flowers!
It seems you have set up the Nuxt config correctly. To fetch data directly from your Kirby instance, without the Nuxt proxy, set the option client
to true
as well. By default, each call will use the Nuxt proxy.
const { data } = await useKql(
query,
{ client: true }
)
Side note: If you use SSG, it may be better to fetch all KQL queries at build time. If done so, no request needs to happen when the app is deployed.
Great! Thank you for your quick reply and help – this works.
But - just to understand - shouldn't client: true
under kql
in the nuxt.config.ts serve the same purpose?
Not at the moment, but would be a good API improvement probably…
Environment
3.5.2
0.27.1
Reproduction
nuxt.config.ts
Describe the bug
Dear Johann, thank you for this module!
The KQL (Kusto Query Language) query works flawlessly when running the application in
nuxt dev
mode – albeit through the proxy. However, the issue arises when attempting to access the KQL API in a static version of the application generated usingnuxt generate
. In this case, the application also tries to access the KQL API through the proxy interface, resulting in failure, since no proxy is provided.Additional context
No response
Logs
No response