This is a special actor and needs to be instantiated with the special id proxy/request
com.apifortress.afthem.actors.proxy.RequestActor
yes
discard_headers
[list[string]]: a list of request header names that need to be discarded immediately
The default upstream actor.
com.apifortress.afthem.actors.proxy.UpstreamHttpActor
yes
connect_timeout
[int]: timeout for the connection process in millisecondssocket_timeout
[int]: timeout for silent socket in millisecondsredirects_enabled
[boolean]: set to true if you want AFtheM to resolve redirects instead of forwarding to the clientmax_redirects
[int]: if redirects are enabled, maximum number of redirects before giving updiscard_headers
[list[string]]: a list of response header names that need to be discarded immediately
An upstream actor that pulls content from text files.
com.apifortress.afthem.actors.proxy.UpstreamFileActor
yes
basepath
[string]: path to the files directory. The file name needs to be provided in the request url
An actor taking care of performing the final checks, packaging and sending back the content.
com.apifortress.afthem.actors.proxy.SendBackActor
yes
A logger actor meant to log both inbound and outbound calls.
The behavior of the logging activity is managed by the etc/logback.xml
file.
com.apifortress.afthem.actors.sidecars.AccessLoggerActor
no
A logger to be used in a flow to log certain facts, determined by the user.
The behavior of the logging activity is managed by the etc/logback.xml
file.
com.apifortress.afthem.actors.sidecars.GenericLoggerActor
no
-
value
[string]: the content to be logged -
evaluated
: if set to true, thevalue
field will be interpreted as a SpEL script. The message is accessible via themsg
variable.
Serializes a full API conversation to JSON and appends it to a file.
com.apifortress.afthem.actors.sidecars.serializers.FileAppenderSerializerActor
no
filename
[string]: name of the filedisable_on_header
[string]: if the provided header is present in the request, then the conversation will skip serializationenable_on_header
[string]: if the provided header is present in the request, then the conversation will be serializeddiscard_request_headers
[list[string]]: list of request headers that should not appear in the serialized conversationdiscard_response_headers
[list[string]]: list of response headers that should not appear in the serialized conversationallow_content_types
[list[string]]: full or partial response content types which make the request eligible for serialization. If the list is null or empty, all content types will be accepted
Alters the headers of a message. If the transformer is placed before an Upstream actor, it modifies the request headers. If after, it modifies the response headers.
com.apifortress.afthem.actors.transformers.TransformHeadersActor
add
[list[nve]]: adds a header. Ifevaluated
is set toŧrue
, the value is treated as a SpEL script. Example:add: - name: header_name value: header_value evaluated: false
remove
[list[nve]]: removes a header. Example:remove: - name: header_name
set
[list[nve]]: sets the value of an existing header, or adds it if the header is not present. Ifevaluated
is set toŧrue
, the value is treated as a SpEL script. Example:set: - name: header_name value: header_value evaluated: false
Filters out any request not matching a certain set of criteria.
com.apifortress.afthem.actors.filters.FilterActor
yes
accept
[list[ve]]: a list of conditions. If verified, the message will be accepted. Example:Just like previous filters, if evaluated is true,accept: - value: "#msg.request().getHeader('accept')=='application/json'" evaluated: true - value: "#msg.request().getHeader('key')=='ABC123'" evaluated: true
value
will be evaluated as SpEL script.reject
[list[ve]]: a list of conditions. If verified, the message will be rejected. Example:reject: - value: "#msg.request().method()!='GET'" evaluated: true