okfde / fragdenstaat_de

Froide Theme for fragdenstaat.de
https://fragdenstaat.de
Other
123 stars 21 forks source link

Add frame-ancestors CSP value to X-Frame-Options middleware #339

Closed stefanw closed 1 year ago

stefanw commented 1 year ago

The standard X-Frame-Options middleware and the opt-out view decorator xframe_options_exempt are not aware of frame-ancestor value in our CSP.

Solution here: remove frame-ancestor from our standard nginx provided CSP and now set it by default in Django when the X-Frame-Options header is sent (ie when the response is not exempt).