-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[BUG] Trailing slash apache2 reverse proxy subpath #4126
Copy link
Copy link
Closed
Labels
Milestone
Description
Describe the bug
Depending on the final trailing slash, the application will load successfully or not.
To Reproduce
FreshRSS is running under a subpath, and the following happens:
example.org/rss/ OK, freshrss redirects to example.org/rss/i/
example.org/rss FAIL, freshrss redirects to example.org/i/ and the <Location> apache directive doesn't match the path
Expected behavior
Both entries should load the application in the same way
Environment information (please complete the following information):
- FreshRSS version: 1.19.1
- Installation type: Docker (image
freshrss/freshrss:arm) - Server: Apache 2.4
Additional context
Reverse proxy configuration file:
ProxyPreserveHost On
<Location /rss >
# RewriteCond %{REQUEST_URI} /+[^\.]+$
# RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,L]
ProxyPass http://127.0.0.1:8079/
ProxyPassReverse http://127.0.0.1:8079/
ProxyPassReverseCookiePath / /rss/
RequestHeader set X-Forwarded-Prefix "/rss"
RequestHeader set X-Forwarded-Proto "https"
Require all granted
Options none
</Location>
If I uncomment the Rewrite lines it's even worst, as the example.org/rss/ becomes 403 Forbidden and example.org/rss still redirecting to example.org/i/
Reactions are currently unavailable