apm policy agent http-header-modifyΒΆ
apm policy agent http-header-modify(1) BIG-IP TMSH Manual apm policy agent http-header-modify(1)
NAME
http-header-modify - HTTP header and cookie manipulation agent for per-request access policy.
MODULE
apm policy agent
SYNTAX
Manipulate HTTP headers or cookies within the policy agent module using the syntax shown in the following sections.
CREATE/MODIFY
create http-header-modify [name]
modify http-header-modify [name]
options:
app-service [[string] | none]
cookie-entries [add | delete | modify | none | replace-all-with] {
[name] {
options:
app-service [[string] | none]
cookie-name [string]
cookie-operation [cookie-delete | cookie-update]
cookie-value [string]
}
}
header-entries [add | delete | modify | none | replace-all-with] {
[name] {
options:
app-service [[string] | none]
header-delimiter [string]
header-name [string]
header-operation [header-append | header-insert | header-remove | header-replace]
header-value [string]
}
}
edit http-header-modify [ [ [name] | [glob] | [regex] ] ... ]
options:
all-properties
non-default-properties
DISPLAY
list http-header-modify
list http-header-modify [ [ [name] | [glob] | [regex] ] ... ]
show running-config http-header-modify
show running-config http-header-modify [ [ [name] | [glob] | [regex] ] ... ]
options:
all-properties
app-service
cookie-entries
header-entries
non-default-properties
partition
DELETE
delete http-header-modify [name]
DESCRIPTION
You can use the http-header-modify component to create and manage a http-header-modify agent that manipulates the HTTP and
Cookie headers. Operations supported for HTTP header include insert, append, replace and remove while for cookie only
update and delete operations are available. Please note that this agent applies only to per-request access policy.
EXAMPLES
create http-header-modify MyProfile_act_http-header-modify_ag {
cookie-entries {
0 {
cookie-name PHPSESSID
cookie-value 1234
}
1 {
cookie-name mySession
cookie-operation cookie-delete
cookie-value 5678
}
}
header-entries {
0 {
header-name Cache-Control
header-value no-cache
}
1 {
header-delimiter ;
header-name User-Agent
header-operation header-append
header-value "Mozilla/5.0"
}
2 {
header-name Pragma
header-operation header-replace
header-value no-store
}
3 {
header-name Pragma
header-operation header-remove
header-value no-cache
}
}
}
In above example, http-header-modify agent named MyProfile_act_http-header-modify_ag in partition Common and adds 2 cookie
and 4 HTTP header entries. cookie entry 0 updates cookie value PHPSESSID to '1234' while entry 1 deletes when cookie value
'mySession=5678'. Header entries refer to various header operations. Entry 0 inserts header 'Cache-Control: 5678'. Entry 1
updates value of header User-Agent to include ';Mozilla/5.0'. Entry 2 replaces value of header Pragma by 'no-store'.
Finally, 3 entry will remove header-value matching 'Pragma: no-cache' from HTTP headers.
list http-header-modify
Displays a list of http-header-modify agents.
OPTIONS
app-service
Specifies the name of the application service to which the object belongs. The default value is none. Note: If the
strict-updates option is enabled on the application service that owns the object, you cannot modify or delete the
object. Only the application service can modify or delete the object.
name Specifies the name of HTTP header modify agent. This setting is required.
cookie-entries
Specifies a list of entries specifying cookie header manipulations.
cookie-name
Specifies cookie name to match. This setting is required for cookie-entries.
cookie-operation
Specifies operation on the cookie name specified in cookie-name. Possible values include cookie-update and
cookie-delete.
cookie-update
Update the cookie value in the cookie-name, cookie-value pair. This is the default cookie-operation.
cookie-delete
Delete the cookie that matches the cookie-name, cookie-value pair.
cookie-value
Specifies cookie value to be operated on. This is required for cookie-entries.
header-entries
Specifies a list of entries specifying HTTP header manipulations.
header-delimiter
Specifies delimiter character to use when header-operation is header-append.
header-name
Specifies HTTP header to match to be operated on. This setting is required for header-entries.
header-operation
Specifies operation on the HTTP header specified in header-name. Options include the following:
header-append
Append header-value to the value of HTTP header header-name delimited by header-delimiter.
header-insert
Insert HTTP header containing header-name, header-value pair. This is the default header-operation.
header-remove
Remove the HTTP header, value pair that matches the header-name, header-value pair.
header-replace
Replace value of HTTP header matching header-name by value header-value.
header-value
Specifies HTTP header value to be operated on. This is required for header-entries.
partition
Displays the partition within which the component resides.
SEE ALSO
tmsh
COPYRIGHT
No part of this program may be reproduced or transmitted in any form or by any means, electronic or mechanical, including
photocopying, recording, or information storage and retrieval systems, for any purpose other than the purchaser's personal
use, without the express written permission of F5 Networks, Inc.
F5 Networks and BIG-IP (c) Copyright 2013, 2015-2016. All rights reserved.
BIG-IP 2016-03-14 apm policy agent http-header-modify(1)