0

I am currently having an requirement to add session timeout for the application, we are using session of Apache server and a session cookie is set by default with no maxage. So in order to add timeout for the session I am using SessionMaxAge directive to set some timeout in httpd.conf file

SessionMaxAge 1200

SessionCookieName session path=/

This works fine as cookie now has some expirytime set, but our requirement is to set this time '1200' dynamically based on configurable value read from some CSS file we have.

Is it possible to extract any css rule value dynamically and assign it to SessionMaxAge directive? Does anyone have any example of setting SessionMaxAge with some value read from any file?

piu
  • 195
  • 1
  • 2
  • 10
  • Even if you do it like that and put that value in the httpd.conf file you'll have to reload httpd or restart it so the new settings take effect. Not sure you want to restart apache everytime you change that value. – Bogdan Stoica Jul 13 '17 at 13:31
  • Yes agree, but restart is also fine as per the requirement we have. All we need is to apply timeout as per User's configuration value in some of our css file. – piu Jul 14 '17 at 01:59
  • checkout `SetEnvIf` directive, although graceful restarts exist to not disrupt server operation, you can define certain cases where variables are set depending on certain dynamic parameters. – Daniel Ferradal Jul 15 '17 at 10:22
  • Yes, but looking at use of SetEnvIf I didn't found any example where its used to read any css rule. Do you have any example? that will be really useful then – piu Jul 17 '17 at 10:41

0 Answers0