Skip to content

Commit 6ccd707

Browse files
Precisions on HTTP_HEADERS
1 parent c8456f2 commit 6ccd707

2 files changed

Lines changed: 15 additions & 10 deletions

File tree

docs/docs/security.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -310,20 +310,24 @@ to all responses by setting the `HTTP_HEADER` system parameter.
310310

311311
The following example, that should be adapted to specific needs, does the following:
312312

313-
- The CSP policy is tailored to Simplicité's working
314-
- STS should be set, 1year is generally considered a good value
315-
- iframes limited to those of same origin
316-
- deactivated XSS protection (a CORS policy is a better approach and **must be implemented**)
317-
- specified Referrer-Policy
313+
- The CSP policy can be tailored to Simplicité's internal needs.
314+
However `https://tile.openstreetmap.org` should be added in the `img-src` section when using OpenStreetMaps maps
315+
and `https://platform.simplicite.io` should be added in the `connect-src`section for up-to-date version check.
316+
- STS should be set, 1 year is generally considered a good value
317+
- iframes limited to those of same origin (only needed if some custom components uses iframes, Simplicité itself does not use them)
318+
- deactivated XSS protection because a proper CORS policy is a better approach and thus **must be implemented**
319+
- specified referrer policy
320+
- specified permissions policy
318321

319322
```json
320323
{
321-
"Content-Security-Policy": "default-src 'self'; img-src 'self' data:; script-src 'self' 'unsafe-inline' 'unsafe-eval' blob:; style-src 'self' 'unsafe-inline'; font-src 'self' data:",
324+
"Content-Security-Policy": "default-src 'self'; img-src 'self' data: blob:; script-src 'self' 'unsafe-inline' 'unsafe-eval' blob:; style-src 'self' 'unsafe-inline'; font-src 'self' data:; connect-src 'self'",
322325
"Strict-Transport-Security": "max-age=31536000",
323326
"X-Content-Type-Options": "nosniff",
324327
"X-Frame-Options": "SAMEORIGIN",
325328
"X-XSS-Protection": "0",
326-
"Referrer-Policy": "strict-origin-when-cross-origin"
329+
"Referrer-Policy": "strict-origin-when-cross-origin",
330+
"Permissions-Policy": "unload=(self)"
327331
}
328332
```
329333

docs/versions/release-notes/v7-0.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,11 @@ The following system parameters have new default values:
171171
- `USE_IO`: the default value is now `no` (no access to the I/O endpoint)
172172
- `USE_IO_TESTER`: the default value is now `no` (no access to the I/O tester page)
173173
- `USE_API_TESTER`: the default value is now `no` (no access to the API tester page)
174-
- `HTTP_HEADER`: the default value now is the one indicated in the [security guidelines](/docs/security).
175-
This has an impact if you use JS scripts, CSS styles sheets, images, ... from external URLs.
174+
- `HTTP_HEADER`: the default value now is the one indicated in the [security guidelines](/docs/security)
175+
with corporate Simplicité URLs and OpenStreetMaps tiles origins added by default in the CSP.
176+
This has an impact if you use specific JS scripts, CSS styles sheets, images, ... from external URLs.
176177
If so you should customize this system parameter (in particular the `Content-Security-Policy`) accordingly
177-
to your use case (see the description of the system parameter for the usual cases: GoogleFonts, OpenStreetMaps, ...).
178+
to your use case (see the Google Fonts example in the documentation of the system parameter).
178179

179180
:::tip[Reminder]
180181

0 commit comments

Comments
 (0)