mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-02-13 15:01:12 -05:00
* API: add remote user in Apache logs fix https://github.com/FreshRSS/FreshRSS/discussions/8385 Example: ``` 2026-01-01T18:38:28.645486326Z 0.0.0.0 - alex [01/Jan/2026:19:38:28 +0100] "GET /api/greader.php/reader/api/0/subscription/list?output=json HTTP/1.1" 200 9798 "-" "curl/8.14.1" ``` * Fallback mod_rewrite * Log remote user with same priority as FreshRSS_http_Util::httpAuthUser()
13 lines
482 B
ApacheConf
13 lines
482 B
ApacheConf
<IfModule mod_setenvif.c>
|
|
SetEnvIfNoCase "Authorization" "(.*)" HTTP_AUTHORIZATION=$1
|
|
SetEnvIfNoCase "Authorization" "^GoogleLogin auth=([^/]+)" REMOTE_USER=$1 LOG_REMOTE_USER=$1
|
|
</IfModule>
|
|
<IfModule !mod_setenvif.c>
|
|
<IfModule mod_rewrite.c>
|
|
RewriteEngine on
|
|
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
|
RewriteCond %{HTTP:Authorization} "^GoogleLogin auth=([^/]+)" [NC]
|
|
RewriteRule .* - [E=REMOTE_USER:%1,E=LOG_REMOTE_USER:%1]
|
|
</IfModule>
|
|
</IfModule>
|