You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$frontend= (new Frontend($delegates, $templates))->enacting($policy);
328
328
;
329
329
```
330
330
331
-
Read more about hardening response headers at https://scotthelme.co.uk/hardening-your-http-response-headers/ or watch this talk: https://www.youtube.com/watch?v=mr230uotw-Y
331
+
For static assets, the same policy can be used:
332
+
333
+
```php
334
+
use web\frontend\{AssetsFrom, Security};
335
+
336
+
$policy= /* see above */
337
+
$assets= (new AssetsFrom($path))->enacting($policy);
338
+
```
339
+
340
+
The default configuration is to set `script-src 'none'; object-src 'none'`, see https://stackoverflow.com/q/10557137
341
+
342
+
*Read more about hardening response headers at https://scotthelme.co.uk/hardening-your-http-response-headers/ or watch this talk: https://www.youtube.com/watch?v=mr230uotw-Y*
0 commit comments