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

Fix CSP example explanation #34286

Merged
merged 2 commits into from
Jun 21, 2024
Merged

Fix CSP example explanation #34286

merged 2 commits into from
Jun 21, 2024

Conversation

Josh-Cena
Copy link
Member

Fix #8137

@Josh-Cena Josh-Cena requested a review from a team as a code owner June 20, 2024 14:37
@Josh-Cena Josh-Cena requested review from teoli2003 and bsmth and removed request for a team and teoli2003 June 20, 2024 14:37
@github-actions github-actions bot added Content:HTTP HTTP docs size/xs [PR only] 0-5 LoC changed labels Jun 20, 2024
Copy link
Contributor

github-actions bot commented Jun 20, 2024

Preview URLs

(comment last updated: 2024-06-20 17:15:04)


```http
Content-Security-Policy: default-src 'self' *.example.com; img-src *
```

Note that this example doesn't specify a {{CSP("script-src")}}; with the example CSP,
this site uses the setting specified by the {{CSP("default-src")}} directive, which means that scripts can be loaded only from the originating server.
this site uses the setting specified by the {{CSP("default-src")}} directive.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about this?

Suggested change
this site uses the setting specified by the {{CSP("default-src")}} directive.
so the {{CSP("default-src")}} directive will be used for JavaScript sources as a fallback.

Copy link
Member

@bsmth bsmth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with one minor reword if you think it's clearer. Thank you!

@github-actions github-actions bot added size/s [PR only] 6-50 LoC changed and removed size/xs [PR only] 0-5 LoC changed labels Jun 20, 2024
@bsmth
Copy link
Member

bsmth commented Jun 21, 2024

Thanks, Josh!

@bsmth bsmth merged commit 7f1426a into mdn:main Jun 21, 2024
8 checks passed
@Josh-Cena Josh-Cena deleted the fix-csp-ex branch June 21, 2024 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:HTTP HTTP docs size/s [PR only] 6-50 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue with "Content Security Policy (CSP)": bad explanatory text on example 5
2 participants