Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space WAPIMGMNT232 and version 24.0

The Simple Header Policy sets, updates and/or removes headers on request, response or both. The values can be literal strings, environment or system properties. Headers can be removed by simple string equality or regular expression.

Info

The X-API-Key cannot be added to a header. Use the API Key policy to do this.

Configuration Options

Add Headers

Add headers to a request, response or both, or overwrite headers.

OptionDescriptionPossible ValuesDefault
Header Name Specify the name of the header to set.any string-
Header Value Specify the value of the header to set, or key into the environment or system properties.Any value corresponding to the value of Value Type.-
Value Type

Specify how to treat the Header Value.

String

Treat as a literal string value.

String

Env

Treat as a key into the environment  Env[headerValue] , and set the returned value to the header.

Info

This property is only available on system setup.

System Properties

Treat as a key into the JVM’s system properties and set the returned value to the header.

Info

This property is only available on system setup.

HeaderTreat as a header name of the incoming request and set this incoming header's value to the header.
Apply to

Specify where to apply the rule.

RequestApply the rules to the request only.Request
ResponseApply the rules to the response only.
BothApply the rules to both, request and response.
Overwrite Existing Enable to overwrite any existing header with same name.
  • enabled
  • disabled
disabled

Multiexcerpt include
SpaceWithExcerptINTERNAL
MultiExcerptNamepolicies_table_handling
PageWithExcerptINTERNAL:_api_excerpts

Strip Headers

Remove headers matching a pattern from a request, response or both.

OptionDescriptionPossible ValuesDefault
Strip Matching Header(s)

Define what field to apply the pattern specified with Pattern to.

Key

Strip headers whose keys matches the specified Pattern.Key
ValueStrip headers whose values matches the specified Pattern.
With Matcher TypeDefine how the pattern specified with Pattern should be handled.StringThe pattern contains a (case-insensitive) string (default).String
Regex

The pattern contains a (case-insensitive) regular expression.

Multiexcerpt include
SpaceWithExcerptINTERNAL
MultiExcerptNameinfo_java_syntax
PageWithExcerptINTERNAL:_api_excerpts

PatternString to match or compile into a regex, depending on the value of with.A valid string according to the definitions in With Matcher Type.

-
Apply toWhere to apply the rule.RequestApply the rules to the request only.Both

ResponseApply the rules to the response only.
BothApply the rules to both, request and response.

Multiexcerpt include
SpaceWithExcerptINTERNAL
MultiExcerptNamepolicies_table_handling
PageWithExcerptINTERNAL:_api_excerpts

Panel
titleOn this Page:

Table of Contents

Panel
titleRelated Pages:

Otp
Floatingfalse

rp