Skip to content

Commit d5de7d4

Browse files
Fix minor typos and grammar in documentation (#3400)
This PR fixes two minor issues in the documentation: Double negation typo Original: hx-boost does not not update the <html> or <body> tags... Fixed: hx-boost does not update the <html> or <body> tags... Explanation: Removed a duplicated "not". Grammar and consistency in terminology Original: The MDN Article provide a good jumping off point... Fixed: The MDN Article provides a good jumping-off point... Explanation: Corrected subject-verb agreement (article → provides). Added hyphens in "jumping-off point" as a compound adjective.
1 parent 458ae04 commit d5de7d4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

www/content/docs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1690,14 +1690,14 @@ This tells the browser "Only allow connections to the original (source) domain".
16901690
`htmx.config.selfRequestsOnly`, but a layered approach to security is warranted and, in fact, ideal, when dealing
16911691
with application security.
16921692

1693-
A full discussion of CSPs is beyond the scope of this document, but the [MDN Article](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) provide a good jumping off point
1693+
A full discussion of CSPs is beyond the scope of this document, but the [MDN Article](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) provides a good jumping-off point
16941694
for exploring this topic.
16951695

16961696
### CSRF Prevention
16971697

16981698
The assignment and checking of CSRF tokens are typically backend responsibilities, but `htmx` can support returning the CSRF token automatically with every request using the `hx-headers` attribute. The attribute needs to be added to the element issuing the request or one of its ancestor elements. This makes the `html` and `body` elements effective global vehicles for adding the CSRF token to the `HTTP` request header, as illustrated below.
16991699

1700-
Note: `hx-boost` does not not update the `<html>` or `<body>` tags; if using this feature with `hx-boost`, make sure to include the CSRF token on an element that _will_ get replaced. Many web frameworks support automatically inserting the CSRF token as a hidden input in HTML forms. This is encouraged whenever possible.
1700+
Note: `hx-boost` does not update the `<html>` or `<body>` tags; if using this feature with `hx-boost`, make sure to include the CSRF token on an element that _will_ get replaced. Many web frameworks support automatically inserting the CSRF token as a hidden input in HTML forms. This is encouraged whenever possible.
17011701

17021702
```html
17031703
<html lang="en" hx-headers='{"X-CSRF-TOKEN": "CSRF_TOKEN_INSERTED_HERE"}'>

0 commit comments

Comments
 (0)