Page MenuHomePhabricator

Consider making CSP header be sent after onBeforePageDisplay hook
Closed, ResolvedPublic

Description

Right now, CSP headers are calculated and sent before the BeforePageDisplay hook. This means that if you add some module in the onBeforePageDisplay hook (which is very common) you cannot adjust the CSP header in the same hook. This makes things rather cumbersome. Maybe we should adjust the CSP header to happen after that hook.

Event Timeline

Bawolff created this task.Mar 2 2020, 8:48 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 2 2020, 8:48 AM

Change 575981 had a related patch set uploaded (by Brian Wolff; owner: Brian Wolff):
[mediawiki/core@master] Allow adjusting CSP headers from BeforePageDisplay hook

https://gerrit.wikimedia.org/r/575981

Change 575981 merged by jenkins-bot:
[mediawiki/core@master] Allow adjusting CSP headers from BeforePageDisplay hook

https://gerrit.wikimedia.org/r/575981

Jdforrester-WMF closed this task as Resolved.Mar 5 2020, 6:08 PM
Jdforrester-WMF assigned this task to Bawolff.