Disable IP checks for OTRS sessions
authorTom Hughes <tom@compton.nu>
Mon, 15 Jul 2019 15:59:16 +0000 (16:59 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 15 Jul 2019 15:59:16 +0000 (16:59 +0100)
cookbooks/otrs/recipes/default.rb

index ab7093e..dd5994b 100644 (file)
@@ -80,6 +80,7 @@ config = edit_file "/opt/otrs-#{version}/Kernel/Config.pm.dist" do |line|
   line.gsub!(/^( *\$Self->{DatabaseDSN} = "DBI:mysql:)/, "#\\1")
   line.gsub!(/^#( *\$Self->{DatabaseDSN} = "DBI:Pg:.*;host=)/, "\\1")
   line.gsub!(/^( *)# (\$Self->{CheckMXRecord} = 0)/, "\\1\\2")
+  line.gsub!(/^( *)# \$Self->{SessionUseCookie} = 0/, "\\1$Self->{SessionCheckRemoteIP} = 0")
 
   line
 end