wso2esb - WSO2 add API context to headers -
wso2esb - WSO2 add API context to headers -
i have several apis behind wso2 instance, each it's own context ("/api-1/", "/api-2/", ...) i'd add together context string dynamically http header (without hardcoding on per-api basis).
so, example:
<sequence name="wso2am--ext--in"> <header name="x-script-name" scope="transport" expression="get-property('', '')"/> </sequence>
is there look can utilize accomplish this? or should resort creating per-api mediator include it?
edit:
i have tried using url regex, expecting treat {context}
part of uri variables, doesn't seem it:
<header name="x-script-name" scope="transport" expression="uri.var.context"/>
did define "uri.var.context" before? not inbuilt variable used. can read "to" header , apply string manipulation using xpath, can context.
edit;
you can read api metadata(context,version etc..) jwt token.get jwt token transport header , manipulate it.
wso2 wso2esb
Comments
Post a Comment