mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
docs: update security.checkOrigin
JSDoc comment (#12011)
This commit is contained in:
parent
f10a3b7fe6
commit
cfdaab257c
2 changed files with 12 additions and 3 deletions
5
.changeset/fresh-pandas-drive.md
Normal file
5
.changeset/fresh-pandas-drive.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Fixes a type and an example in documenting the `security.checkOrigin` property of Astro config.
|
|
@ -442,8 +442,8 @@ export interface AstroUserConfig {
|
|||
/**
|
||||
* @docs
|
||||
* @name security
|
||||
* @type {boolean}
|
||||
* @default `{}`
|
||||
* @type {Record<"checkOrigin", boolean> | undefined}
|
||||
* @default `{checkOrigin: true}`
|
||||
* @version 4.9.0
|
||||
* @description
|
||||
*
|
||||
|
@ -451,12 +451,16 @@ export interface AstroUserConfig {
|
|||
*
|
||||
* These features only exist for pages rendered on demand (SSR) using `server` mode or pages that opt out of prerendering in `static` mode.
|
||||
*
|
||||
* By default, Astro will automatically check that the “origin” header
|
||||
* matches the URL sent by each request in on-demand rendered pages. You can
|
||||
* disable this behavior by setting `checkOrigin` to `false`:
|
||||
*
|
||||
* ```js
|
||||
* // astro.config.mjs
|
||||
* export default defineConfig({
|
||||
* output: "server",
|
||||
* security: {
|
||||
* checkOrigin: true
|
||||
* checkOrigin: false
|
||||
* }
|
||||
* })
|
||||
* ```
|
||||
|
|
Loading…
Reference in a new issue