-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add plugins to higress console (#315)
- Loading branch information
Showing
30 changed files
with
373 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
backend/sdk/src/main/resources/plugins/ai-security-guard/spec.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
backend/sdk/src/main/resources/plugins/ai-token-ratelimit/spec.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
backend/sdk/src/main/resources/plugins/cache-control/spec.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
apiVersion: 1.0.0 | ||
info: | ||
category: transformation | ||
name: cache-control | ||
title: Cache Control | ||
x-title-i18n: | ||
zh-CN: 缓存控制 | ||
description: Add Expires and Cache-Control headers to the response headers to facilitate browser caching of specific file types, such as jpg, png, and other image files. | ||
x-description-i18n: | ||
zh-CN: 为响应头部添加 Expires 和 Cache-Control 头部,从而方便浏览器对特定后缀的文件进行缓存,例如 jpg、png 等图片文件。 | ||
iconUrl: https://img.alicdn.com/imgextra/i3/O1CN01bAFa9k1t1gdQcVTH0_!!6000000005842-2-tps-42-42.png | ||
version: 1.0.0 | ||
contact: | ||
name: Higress Team | ||
url: http://higress.io/ | ||
email: admin@higress.io | ||
spec: | ||
phase: AUTHN | ||
priority: 420 | ||
configSchema: | ||
openAPIV3Schema: | ||
type: object | ||
example: | ||
suffix: jpg|png|jpeg | ||
expires: 3600 |
42 changes: 42 additions & 0 deletions
42
backend/sdk/src/main/resources/plugins/cluster-key-rate-limit/spec.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
apiVersion: 1.0.0 | ||
info: | ||
category: traffic | ||
name: cluster-key-rate-limit | ||
title: Key Cluster Rate Limit | ||
x-title-i18n: | ||
zh-CN: 基于 Key 集群限流 | ||
description: Implement cluster-level rate limiting based on specific key values, which can be derived from URL parameters, HTTP request headers, client IP addresses, etc. | ||
x-description-i18n: | ||
zh-CN: 根据特定键值实现集群层面的限流,键值来源可以是 URL 参数、HTTP 请求头、客户端 IP 地址等。 | ||
iconUrl: https://img.alicdn.com/imgextra/i3/O1CN01bAFa9k1t1gdQcVTH0_!!6000000005842-2-tps-42-42.png | ||
version: 1.0.0 | ||
contact: | ||
name: Higress Team | ||
url: http://higress.io/ | ||
email: admin@higress.io | ||
spec: | ||
phase: UNSPECIFIED_PHASE | ||
priority: 20 | ||
configSchema: | ||
openAPIV3Schema: | ||
type: object | ||
example: | ||
rule_name: default_rule | ||
rule_items: | ||
- limit_by_param: apikey | ||
limit_keys: | ||
- key: 9a342114-ba8a-11ec-b1bf-00163e1250b5 | ||
query_per_minute: 10 | ||
- key: a6a6d7f2-ba8a-11ec-bec2-00163e1250b5 | ||
query_per_hour: 100 | ||
- limit_by_per_param: apikey | ||
limit_keys: | ||
- key: "regexp:^a.*" | ||
query_per_second: 10 | ||
- key: "regexp:^b.*" | ||
query_per_minute: 100 | ||
- key: "*" | ||
query_per_hour: 1000 | ||
redis: | ||
service_name: redis.static | ||
show_limit_quota_header: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
apiVersion: 1.0.0 | ||
info: | ||
category: security | ||
name: cors | ||
title: CORS | ||
x-title-i18n: | ||
zh-CN: CORS | ||
description: Enables CORS (Cross-Origin Resource Sharing) HTTP response headers for the server. | ||
x-description-i18n: | ||
zh-CN: 为服务端启用 CORS(Cross-Origin Resource Sharing,跨域资源共享)的返回 HTTP 响应头。 | ||
iconUrl: https://img.alicdn.com/imgextra/i1/O1CN01jKT9vC1O059vNaq5u_!!6000000001642-2-tps-42-42.png | ||
version: 1.0.0 | ||
contact: | ||
name: Higress Team | ||
url: http://higress.io/ | ||
email: admin@higress.io | ||
spec: | ||
phase: AUTHZ | ||
priority: 340 | ||
configSchema: | ||
openAPIV3Schema: | ||
type: object | ||
example: | ||
allow_origins: | ||
- '*' | ||
allow_methods: | ||
- '*' | ||
allow_headers: | ||
- '*' | ||
expose_headers: | ||
- '*' | ||
allow_credentials: false | ||
max_age: 7200 | ||
|
8 changes: 5 additions & 3 deletions
8
backend/sdk/src/main/resources/plugins/custom-response/spec.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
backend/sdk/src/main/resources/plugins/de-graphql/spec.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
apiVersion: 1.0.0 | ||
info: | ||
category: transformation | ||
name: de-graphql | ||
title: DeGraphQL | ||
x-title-i18n: | ||
zh-CN: DeGraphQL | ||
description: Convert a RESTful API to a GraphQL request. | ||
x-description-i18n: | ||
zh-CN: 将 Restful API 转换为 GraphQL 请求。 | ||
iconUrl: https://img.alicdn.com/imgextra/i3/O1CN01bAFa9k1t1gdQcVTH0_!!6000000005842-2-tps-42-42.png | ||
version: 1.0.0 | ||
contact: | ||
name: Higress Team | ||
url: http://higress.io/ | ||
email: admin@higress.io | ||
spec: | ||
phase: AUTHN | ||
priority: 430 | ||
configSchema: | ||
openAPIV3Schema: | ||
type: object | ||
example: | ||
timeout: 5000 | ||
endpoint: /graphql | ||
domain: api.github.com | ||
gql: | | ||
query ($owner:String! $name:String!){ | ||
repository(owner:$owner, name:$name) { | ||
name | ||
forkCount | ||
description | ||
} | ||
} |
Oops, something went wrong.