Skip to content

Add check for Apache mod_filter to ensure "AddOutputFilterByType" works.#7419

Merged
Alkarex merged 2 commits intoFreshRSS:edgefrom
dezponia:edge
Mar 13, 2025
Merged

Add check for Apache mod_filter to ensure "AddOutputFilterByType" works.#7419
Alkarex merged 2 commits intoFreshRSS:edgefrom
dezponia:edge

Conversation

@dezponia
Copy link
Contributor

@dezponia dezponia commented Mar 8, 2025

AddOutputFilterByType has been moved from mod_deflate to mod_filter in Apache 2.3.7. Without the mod_filter module loaded Apache will error out reading the p/.htaccess file.

Apache documentation about the AddOutputFilterByType directive for reference:
https://httpd.apache.org/docs/2.4/mod/mod_filter.html#addoutputfilterbytype

This issue was encountered when installing FreshRSS 1.26.0 in a shared hosting environment where compression is applied at the reverse proxy, not the Apache web server.

Changes proposed in this pull request:

Add check in .htaccess for Apache mod_filter to ensure AddOutputFilterByType works.

It may also be necessary to update the Apache LoadModule configuration to include mod_filter for the Docker container files. I haven't tested running this with Docker.

How to test the feature manually:

  1. Setup Apache 2.4 with mod_deflate, but without mod_filter loaded.
  2. Install FreshRSS 1.26.0 and try to run it.
  3. Notice it doesn't work and the Apache error logs complains about missing the module for AddOutputFilterByType
  4. Apply this patched .htaccess and try again, notice that it now works as Apache knows to ignore the AddOutputFilterByType directive due to missing mod_filter. If both mod_filter and mod_deflate are loaded it will also work.

Pull request checklist:

  • clear commit messages
  • code manually tested
  • unit tests written (optional if too hard)
  • documentation updated

Add check for Apache mod_filter to ensure "AddOutputFilterByType" works.
@Alkarex Alkarex added this to the 1.26.1 milestone Mar 8, 2025
@Alkarex Alkarex modified the milestones: 1.26.1, 1.27.0 Mar 8, 2025
@Alkarex Alkarex modified the milestones: 1.26.1, 1.27.0 Mar 8, 2025
@Alkarex Alkarex merged commit df545b5 into FreshRSS:edge Mar 13, 2025
1 check passed
@Alkarex Alkarex modified the milestones: 1.27.0, 1.26.2 Apr 1, 2025
@Alkarex
Copy link
Member

Alkarex commented Apr 27, 2025

Oh, I forgot to thank you here. And please add a line for you in https://github.com/FreshRSS/FreshRSS/blob/edge/CREDITS.md

@dezponia dezponia mentioned this pull request Apr 28, 2025
1 task
Alkarex pushed a commit that referenced this pull request Apr 28, 2025
Adding myself to CREDITS.md as requested in PR #7419 comment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants