The gateway can inject content into responses. This entry defines the content and when injection should take place. Content injection is performed based on the request path and a specific location within the response.
This entry is an array and can define multiple content injection points.
|name||string||A name to be associated with this content injection rule.|
|paths||Array of string||The path for which content injection will take place. This entry is an array and can be used to specify multiple paths.|
|Should the location match a full line, or should it match any string in the response? When a full line match is configured the content will be inserted prior to the matching line. When a partial line match is configured the content will be inserted immediately prior to the matching string.|
|location||string||The location where the content should be injected. If a full line match is being used the location is pattern matched against a line in the response using the |
|If a partial line match is being used this configuration entry will control whether the matching string is replaced with the supplied content, or whether the supplied content is inserted prior to the matching string. This configuration entry will be ignored if full line matches are being used.|
|content||string||The data which is to be injected.|
policies: content_injection: - name: content_injection_1 paths: - "/test" - "/test2" location: "<h3>*" content: | <hr/> <h4>Add heading4 after heading3</h4> <hr/>
Updated 8 months ago