Skip to content

Commit f2f87de

Browse files
authored
Merge pull request #214 from righettod/master
Add warning for CSP and Web API.
2 parents d114955 + f587b25 commit f2f87de

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tab_bestpractices.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ The following section proposes a configuration for the [actively supported and w
2929

3030
📖 The headers proposed below can be applied both in the context of a *classic web application* and in that of a *web API*.
3131

32+
🚩 Regarding the header `Content-Security-Policy`, keep in mind that the policy applicability depends on the execution context. Technical details are available [here](https://www.w3.org/TR/CSP2/#which-policy-applies). Therefore, CSP usage in a web API application implies to **define the CSP in the document consuming the content of the web API**.
33+
3234
🚩 The header `Clear-Site-Data` will cause the browser to take additional processing time for the HTTP response, so, set it to the logout function when possible.
3335

3436
🔬 For the header `Permissions-Policy`, as it is currently only supported by [Chromium based browsers](https://caniuse.com/permissions-policy), the proposed value was generated with this [site](https://www.permissionspolicy.com/) and tested against the version `128.0.6606.0` of [Chromium](https://chromium.woolyss.com/download/en/) to only specify supported features.

0 commit comments

Comments
 (0)