Forum Discussion
Rico
Jan 31, 2019Cirrus
Here is an LTM Policy I got working that should fit your needs.
ltm policy set_language {
last-modified 2019-01-31:10:49:10
requires { http }
rules {
set_en {
actions {
0 {
http-set-cookie
response
insert
name i18next
value en
}
1 {
log
response
write
facility local0
message "Set EN Triggered"
priority info
}
}
conditions {
0 {
http-cookie
name i18next
not
values { en }
}
}
}
set_es {
actions {
0 {
http-set-cookie
response
insert
name i18next
value es
}
1 {
log
response
write
facility local0
message "Set ES triggered"
priority info
}
}
conditions {
0 {
http-host
host
contains
values { es.test.company.com }
}
1 {
http-cookie
name i18next
not
values { es }
}
}
ordinal 1
}
}
status published
strategy all-match
}