Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update security.checkOrigin JSDoc comment #12011

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fresh-pandas-drive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fixes a type and an example in documenting the `security.checkOrigin` property of Astro config.
10 changes: 7 additions & 3 deletions packages/astro/src/types/public/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -442,21 +442,25 @@ export interface AstroUserConfig {
/**
* @docs
* @name security
* @type {boolean}
* @default `{}`
* @type {Record<"checkOrigin", boolean> | undefined}
* @default `{checkOrigin: true}`
* @version 4.9.0
* @description
*
* Enables security measures for an Astro website.
*
* 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
* }
* })
* ```
Expand Down
Loading