This action stream a response body and inject a text after the first specified html tag.This action can be used to inject a html code snippet after opening <head>
tag in any traversing html page.This action supports chunked transfer stream and the following body encodings: gzip, deflate, brotli and lzw.
Evaluation scope defines the timing where this filter will be applied.
responseHeaderReceivedFromRemote This scope occurs the moment fluxzy has done parsing the response header.
injectHtmlTagAction
This action has no specific characteristic
The following examples apply this action to any exchanges
Inject a CSS style tag after <head>
that sets the document body color to red.
rules:
- filter:
typeKind: AnyFilter
actions:
- typeKind: InjectHtmlTagAction
tag: head
htmlContent: '<style>body { background-color: red !important; }</style>'
restrictToHtml: true
Inject a file after <head>
.
rules:
- filter:
typeKind: AnyFilter
actions:
- typeKind: InjectHtmlTagAction
tag: head
fromFile: true
fileName: injected.html
restrictToHtml: true
View definition of InjectHtmlTagAction for .NET integration.
The following actions are related to this action: