1

I have a Firefox extension displaying its own HTML page via a chrome:// url, and scripts in it are running with chrome privileges. For users' security, I want to add a Content Security Policy to this page.

The obvious thing to do is to add it via <meta> tag, but that's not yet supported in Firefox (bug 663570). Update: Bug 663570 was fixed in Firefox 45, but my attempts to use a tag caused Firefox to crash. Bug 923902 seems to be the new bug to watch.

Is there any way to implement a CSP right now? Some way to fake the appropriate HTTP header for a chrome:// URL?

Pixievolt No. 1
  • 780
  • 4
  • 15

1 Answers1

0

I asked this question waaay back in the days of XUL add-ons, which are long gone - in this era of WebExtensions, I could define a CSP in manifest.json, although the default CSP is plenty secure.

Pixievolt No. 1
  • 780
  • 4
  • 15