Page MenuHomePhabricator

Unconditionally set up restrictive CSP headers for non-HTML/SVG content in RESTBase
Closed, ResolvedPublic

Description

In T111820 @csteipp rightly pointed out that there is value in setting CSP headers to disallow framing on non-HTML/SVG responses. Unless there is a use case for custom CSP headers on JSON or other non-HTML/SVG responses, I would propose to unconditionally set very restrictive CSP headers on anything but /^(?:text\/html|image\/svg)/i:

Content-Security-Policy: default-src 'none'; frame-ancestors 'none'

Event Timeline

GWicke raised the priority of this task from to Needs Triage.
GWicke updated the task description. (Show Details)
GWicke added subscribers: GWicke, csteipp.
GWicke triaged this task as Medium priority.Sep 14 2015, 8:39 PM
GWicke added a project: RESTBase.
GWicke set Security to None.
GWicke updated the task description. (Show Details)
GWicke edited subscribers, added: mobrovac, Pchelolo; removed: Aklapper.
mobrovac claimed this task.

PR 333 has been deployed.