You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many may wonder why we don't use tools like Nginx, Traefik, or Kong, which already serve as gateways. From my observations, these options do not necessarily provide a configuration simplicity that end-users can easily manage. Additionally, it appears that, for the most part, these tools are designed for static values that can be transformed in the response, without the ability to incorporate additional conditions, such as based on the path or specific requests.
If anyone is familiar with a project that addresses similar concerns, I would appreciate some recommendations. Thank you.
using syntax a[0].b.c=new payload,a[0].b="hey,xxx" , this will override 2 parts of the body shown below (Use " for wrapping comma (,) and use \" in the double quotes " ):
Problem Statement
Many may wonder why we don't use tools like Nginx, Traefik, or Kong, which already serve as gateways. From my observations, these options do not necessarily provide a configuration simplicity that end-users can easily manage. Additionally, it appears that, for the most part, these tools are designed for static values that can be transformed in the response, without the ability to incorporate additional conditions, such as based on the path or specific requests.
If anyone is familiar with a project that addresses similar concerns, I would appreciate some recommendations. Thank you.
References for API Gateways/Reverse Proxy Server:
https://github.com/traefik/plugin-rewritebody
https://github.com/traefik/traefik/issues/2039
References for Stubbing & Double Test:
How the spy work?
Modify HTTP Response Reverse Proxy
Store config rule in a data store
Admin Route
/srp
(If pass expression evaluation) using Provide express middleware as external library data-viewer#6, to show the list for debugingSRP_ADMIN_ROOT_PATH
: the root path of admin of the reverse proxy, default is/srp
Data Schema for Spy config rules
true
/false
(for early release) = default is truerequest_transformer(For Future Release)**response_transformer**
<action> = <value>
, the value is JSON-compatibility data<action> = <key> : <value>
, the value is JSON-compatibility data<action> = <value> , <action> = <value>
<action> = <value> , <action> = <key> : <value>
add.headers={"Content-Type":"application/json"}
replace.status_code=400
add.json={"data": "Hello World"}
replace.json={"data": "Hello"}
replace.key_json=customers.info.phone:"01-1234-5678"
replace.key_json=customers.info:{"phone":"01-1234-5678"}
using syntax
a[0].b.c=new payload,a[0].b="hey,xxx"
, this will override 2 parts of the body shown below (Use"
for wrapping comma (,
) and use\"
in the double quotes"
):a[0].b.c
⇒new payload
a[0].b.d
⇒hey,xxx
Example Response Input:
Example Response Output:
use syntax from
lodash.set()
as https://lodash.com/docs/4.17.15#setremove.key_json=customers.info.phone
Environment Variables
SRP_UPSTREAM_URL
the target URL that want the spy server taken over it.SRP_DATA_AZURE_TABLE_CONNECTION_STRING
, the connection string for Azure TableSRP_PORT
the running portSRP_DISABLED
if the value istrue
, ignore all spy config rulesSRP_ADMIN_ROOT_PATH
: the root path of admin of the reverse proxy, default is/srp
Running Mode
Single Upstream URL
Multiple Upstream URLs in single datastore
Vocab
The text was updated successfully, but these errors were encountered: