Skip to content

Commit e028e38

Browse files
docs: improve cors faq page
1 parent 4e2546d commit e028e38

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

docs/.vitepress/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ function sidebarGuide() {
9191
text: 'FAQ',
9292
collapsible: true,
9393
items: [
94-
{ text: 'CORS', link: '/guide/faq-cors-issues' },
94+
{ text: 'Can I Have CORS Issues?', link: '/guide/faq-cors-issues' },
9595
],
9696
},
9797
]

docs/guide/faq-cors-issues.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1-
# CORS Issues
1+
# Can I Have CORS Issues?
22

3-
When using this plugin by default, you won't have to deal with CORS issues. Data is fetched proxied on the Nuxt server. Thus, no data is fetched from the client.
3+
## tl;dr
4+
5+
No.
6+
7+
## Detailed Answer
8+
9+
With the default module configuration, you won't have to deal with CORS issues. [`useKql`](/api/use-kql) and [`$kql`](/api/kql) pass given queries to the Nuxt server route `/api/__kql__`. The query is fetched from the Kirby instance on the server-side and then passed back to the client. Thus, no data is fetched from the Kirby instance on the client-side. It is proxied by the Nuxt server and no CORS issues will occur.

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ features:
2929
- title: Various Authentication Methods
3030
details: Basic, bearer or no authentication. Teams up best with kirby-headless-starter!
3131
- title: Familiar Data Handling
32-
details: Handle query requests just like you would with Nuxt's useFetch composable.
32+
details: Handle query requests just like with Nuxt's useFetch composable. Caching included.
3333
- title: TypeScript
3434
details: Bring your own query response typings. Otherwise, nuxt-kql will provide defaults for you.
3535
---

0 commit comments

Comments
 (0)