Update CORS Policy
updateCorsPolicyUpdate an existing CORS policy by ID, merging provided fields with the current policy and replacing it via PUT.
Instructions
Update an existing CORS policy by ID on the global AM CorsService. Performs a full replacement on the wire (fetch-then-PUT): the current policy is fetched first, any provided fields are merged over it, and the complete policy is PUT back to AM. Fields not supplied are preserved from the existing policy.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"policyId": "<policyId>"
},
"name": "updateCorsPolicy"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| maxAge | No | New preflight cache duration in seconds | |
| enabled | No | Whether the policy is enabled | |
| policyId | Yes | The unique identifier of the CORS policy to update | |
| exposedHeaders | No | New response headers exposed to the browser | |
| acceptedHeaders | No | New non-simple request headers allowed during preflight | |
| acceptedMethods | No | New HTTP methods allowed during preflight | |
| acceptedOrigins | No | New allowed origins | |
| allowCredentials | No | Whether to send Access-Control-Allow-Credentials: true on responses |