Comments (4)
There are 5 filters in total:
- ExtensionRef
- HTTPURLRewriteFilter
- HTTPRequestMirrorFilter
- HTTPRequestRedirectFilter
- HTTPHeaderFilter
Of these 5,
- ExtensionRef
- HTTPURLRewriteFilter
- HTTPHeaderFilter (
add
,set
andremove
)
are functional in APK.
The sample HTTPRoute filters used for testing HTTPHeaderFilter are given below:
- requestHeaderModifier:
- type: "RequestHeaderModifier"
requestHeaderModifier:
add:
- name: X-Request-Custom-Header
value: "Request-Custom-Header"
set:
- name: User-Agent
value: "Replaced existing value for user agent"
remove: ["Postman-Token"]
- responseHeaderModifier:
- type: "ResponseHeaderModifier"
responseHeaderModifier:
add:
- name: X-Response-Custom-Header
value: "Response-Custom-Header"
set:
- name: data
value: "Replaced existing value for data from backend response"
remove: ["access-control-allow-credentials"]
from apk.
- Mirrors requests to the backends specified under the filter
- Needs to be given a backendRef to mirror the request to
- The request is sent to the original backendRef provided under the rule as well
- However, the responses from the backend provided under the filter will be ignored; only the response from the original backend will be sent back to the client.
Sample:
- type: "RequestMirror"
requestMirror:
backendRef:
group: "dp.wso2.com"
kind: "Backend"
name: "backend-736990a5eefb375887fdb20008ff04c43a8d3796-api"
https://www.envoyproxy.io/docs/envoy/latest/start/sandboxes/route-mirror
from apk.
- Redirects the request to the specified URL
- Cannot be used on the same rule as a URLRewrite
- Cannot have a backendRef in that match either
- type: "RequestRedirect"
requestRedirect:
scheme: "https"
hostname: "webhook.site"
path:
type: "ReplaceFullPath"
replaceFullPath: "/e961947c-0607-4d9d-9fe9-c7489cba84f8"
port: 443
statusCode: 301
from apk.
Subtasks
- Add header modification and removal support to config deployer (PR: #2381)
- Add header modification and removal support to agent (Issue: #2387)
- Add header modification and removal policies to APIM with APK (PR: wso2/product-apim#13498)
- Add request redirect and mirror filters to adapter (PR: #2391)
- Add request redirect and mirror filter support to config deployer (PR: #2392)
- Add request redirect and mirror filter support to APIM APK Agent
- Add policies for request redirect and mirror filters to APIM (PR: wso2/product-apim#13498)
- Update VSCode extension (PR: https://github.com/wso2-enterprise/vscode-extensions/pull/3287)
from apk.
Related Issues (20)
- Unable to attach different scopes for different resources using config ds
- Need to add documentation related to setting APK as a gateway in APIM in APIM docs
- gRPC support for APK
- Need to add deployment Patterns for CP to DP and DP to CP flow and Refactor Control Plane docs
- oAuth2 disabled configuration not properly mapped in the APK-Conf generation flow
- Issue with status in API CRs
- There is Limitation in features of control plane! I Suggest remove limits! HOT 2
- Code redundancy in agent-integration tests
- Proto parser has limitations (feature/grpc branch)
- API deployment not working (APIM 4.3.0 as control plan) HOT 2
- APIM 4.3.0 locally DP runs K8s Rancher and mixing up subscription information
- Upgrade go version
- Installation issue in APK 1.1.0 HOT 2
- Add header modifier, request redirect and request mirroring support in Agent
- Cine Mundo
- Hostname verification failure in system routes in gateway.
- Test issue
- Adapter Attempts to Update Owner Reference of Unrelated Artifacts
- Complete API Key functionality
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apk.