# If you need custom .htaccess rules, instead of modifying this file,
# create one in `./i/.htaccess` (in particular for access control such as HTTP Basic Auth),
# or in `../.htaccess` for other more general rules.
# See also `../.htaccess.dist` if you cannot set Apache `DocumentRoot` to here (`FreshRSS/p/`) as recommended
DirectoryIndex index.php index.html
FileETag None
AddDefaultCharset UTF-8
AddType application/javascript .js
AddType application/json .map
AddCharset UTF-8 .html
AddCharset UTF-8 .js
AddOutputFilterByType DEFLATE application/javascript application/json application/xhtml+xml image/svg+xml text/css text/html
ExpiresActive on
ExpiresDefault "access plus 1 month"
ExpiresByType application/javascript "access plus 1 month"
ExpiresByType application/xhtml+xml "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 month"
ExpiresByType text/html "access plus 1 month"
ExpiresActive Off
Header merge Cache-Control "public"
Header edit Set-Cookie ^(.*)$ "$1; SameSite=Lax"
# Provide the true IP address of the connection (e.g. last proxy), even when using mod_remoteip
RewriteEngine on
RewriteRule .* - [E=CONN_REMOTE_ADDR:%{CONN_REMOTE_ADDR}]
# If you run an old Apache 2.2-, disable mod_setenvif and enable mod_rewrite, or comment out next line
SetEnvIfExpr "%{CONN_REMOTE_ADDR} =~ /(.*)/" CONN_REMOTE_ADDR=$1