Repository navigation
Conversation
| if (file_exists(DATA_PATH . '/no-cache.txt') || !httpConditional($mtime, cacheSeconds: 604800, cachePrivacy: 2)) { | ||
| echo $extension->getFile($filename); | ||
| } | ||
| exit; |
There was a problem hiding this comment.
It's used as exit() elsewhere. (Also I somewhat wonder if it shouldn't be in Dispatcher, but I suppose that's neither here nor there.)
Lines 512 to 514 in 95842d8
|
I made changes to use the approach from the export action instead: FreshRSS/app/Controllers/importExportController.php Lines 763 to 767 in 95842d8 The view is rendered by the framework after it sets the CSP header, this line specifically: FreshRSS/lib/Minz/ActionController.php Line 112 in 95842d8 But I did not see any PHP warnings even before adding the |
|
Related: #3035 (comment) |
Right, that's the same thing as what I was alluding to, just without special casing a null view.
Same, as I said. |
With your changes works perfectly without PHP warnings. |
#9267) Closes #9229 I restored my accidently deleted patches with @Inverle fixes. This fix is still works perfectly. Sorry. (#9230) How to test the feature manually: With this change: 1. Go to FreshRSS UserCSS extension config 2. Enable the UserCSS and set the CSS code in it. 3. Go to FreshRSS feeds page. 4. Hit the ctrl + F5 button and see no errors in the nginx log.
Closes #9229
Changes proposed in this pull request:
This PR fixes a "Cannot modify header information - headers already sent" warning that occurs when serving extension files (like custom CSS) via
extensionController.php.It's done by rendering the extension file in the view instead of echoing it, so that it matches the order of operations:
instead of:
How to test the feature manually:
With this change:
CSS file: style.css
Pull request checklist:
Additional information can be found in the documentation.