Kong · Schema
CorsPluginConfig
API GatewayAI GatewayAI ConnectivityAgent GatewayEvent GatewayMCP RegistryService MeshLLMKafkaKonnectOpen Source
Properties
| Name | Type | Description |
|---|---|---|
| config | object | |
| name | object | |
| protocols | array | A set of strings representing HTTP protocols. |
| route | object | If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used. |
| service | object | If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched. |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "#/components/schemas/CorsPluginConfig",
"title": "CorsPluginConfig",
"x-speakeasy-entity": "PluginCors",
"properties": {
"config": {
"type": "object",
"properties": {
"allow_origin_absent": {
"description": "A boolean value that skip cors response headers when origin header of request is empty",
"type": "boolean",
"default": true
},
"credentials": {
"description": "Flag to determine whether the `Access-Control-Allow-Credentials` header should be sent with `true` as the value.",
"type": "boolean",
"default": false
},
"exposed_headers": {
"description": "Value for the `Access-Control-Expose-Headers` header. If not specified, no custom headers are exposed.",
"type": "array",
"items": {
"type": "string"
}
},
"headers": {
"description": "Value for the `Access-Control-Allow-Headers` header.",
"type": "array",
"items": {
"type": "string"
}
},
"max_age": {
"description": "Indicates how long the results of the preflight request can be cached, in `seconds`.",
"type": "number"
},
"methods": {
"description": "'Value for the `Access-Control-Allow-Methods` header. Available options include `GET`, `HEAD`, `PUT`, `PATCH`, `POST`, `DELETE`, `OPTIONS`, `TRACE`, `CONNECT`. By default, all options are allowed.'",
"type": "array",
"items": {
"enum": [
"CONNECT",
"DELETE",
"GET",
"HEAD",
"OPTIONS",
"PATCH",
"POST",
"PUT",
"TRACE"
],
"type": "string"
},
"default": [
"CONNECT",
"DELETE",
"GET",
"HEAD",
"OPTIONS",
"PATCH",
"POST",
"PUT",
"TRACE"
]
},
"origins": {
"description": "List of allowed domains for the `Access-Control-Allow-Origin` header. If you want to allow all origins, add `*` as a single value to this configuration field. The accepted values can either be flat strings or PCRE regexes. NOTE: If you don't specify any allowed domains, all origins are allowed.",
"type": "array",
"items": {
"type": "string"
}
},
"preflight_continue": {
"description": "A boolean value that instructs the plugin to proxy the `OPTIONS` preflight request to the Upstream service.",
"type": "boolean",
"default": false
},
"private_network": {
"description": "Flag to determine whether the `Access-Control-Allow-Private-Network` header should be sent with `true` as the value.",
"type": "boolean",
"default": false
}
}
},
"name": {
"const": "cors"
},
"protocols": {
"description": "A set of strings representing HTTP protocols.",
"type": "array",
"items": {
"enum": [
"grpc",
"grpcs",
"http",
"https"
],
"minLength": 1,
"type": "string"
},
"format": "set",
"default": [
"grpc",
"grpcs",
"http",
"https"
]
},
"route": {
"description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string"
}
}
},
"service": {
"description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.",
"type": "object",
"additionalProperties": false,
"properties": {
"id": {
"type": "string"
}
}
}
}
}