Преглед изворни кода

add OIDCSessionMaxDuration and OIDCSessionInactivityTimeout (#6642)

* add OIDCSessionMaxDuration and OIDCSessionInactivityTimeout

* entrypoint.sh OIDCSessionMaxDuration and Session fix

* fix: entrypoint.sh OIDCSessionMaxDuration and OIDCSessionInactivityTimeout and Alpine support

* Use Apache config file instead

* Spelling

* fixed after restarting the double OIDC lines

* Refactor

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
нездалисько пре 1 година
родитељ
комит
b4ceabc248
2 измењених фајлова са 3 додато и 0 уклоњено
  1. 1 0
      Docker/FreshRSS.Apache.conf
  2. 2 0
      Docker/entrypoint.sh

+ 1 - 0
Docker/FreshRSS.Apache.conf

@@ -53,6 +53,7 @@ CustomLog "|/var/www/FreshRSS/cli/sensitive-log.sh" combined_proxy
 		OIDCXForwardedHeaders ${OIDC_X_FORWARDED_HEADERS}
 	</IfDefine>
 
+	# Can be overridden e.g. in /var/www/FreshRSS/p/i/.htaccess
 	OIDCRefreshAccessTokenBeforeExpiry 30
 </IfDefine>
 

+ 2 - 0
Docker/entrypoint.sh

@@ -31,6 +31,8 @@ if [ -n "$OIDC_ENABLED" ] && [ "$OIDC_ENABLED" -ne 0 ]; then
 		OIDC_SCOPES=$(echo "$OIDC_SCOPES" | tr ':' ' ')
 		export OIDC_SCOPES
 	fi
+	find /etc/apache2/*/ -type f -name '*openidc.conf' -exec sed -r -i "/^#?OIDCSessionInactivityTimeout/s/^.*/OIDCSessionInactivityTimeout ${OIDCSessionInactivityTimeout:-86400}/" {} \;
+	find /etc/apache2/*/ -type f -name '*openidc.conf' -exec sed -r -i "/^#?OIDCSessionMaxDuration/s/^.*/OIDCSessionMaxDuration ${OIDCSessionMaxDuration:-2592000}/" {} \;
 fi
 
 if [ -n "$CRON_MIN" ]; then