Skip to main content
Update CORS configuration
curl --request PATCH \
  --url https://sapi.withsutro.com/applications/{applicationId}/cors \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-sutro-api-client: <api-key>' \
  --data '
{
  "allowedOrigins": [
    "http://localhost:8080",
    "https://app.example.com"
  ]
}
'
{
  "allowedOrigins": [
    "http://localhost:8080",
    "https://app.example.com"
  ]
}

Authorizations

Authorization
string
header
required

Builder authentication and authorization

x-sutro-api-client
string
header
required

A unique identifier for the API Client making a request

Path Parameters

applicationId
string<uuid>
required

Body

application/json

CORS (Cross-Origin Resource Sharing) configuration for the application's backend API

allowedOrigins
string[]
required

List of allowed origins that can make cross-origin requests to the backend API

Example:
[
"http://localhost:8080",
"https://app.example.com"
]

Response

The updated CORS configuration

CORS (Cross-Origin Resource Sharing) configuration for the application's backend API

allowedOrigins
string[]
required

List of allowed origins that can make cross-origin requests to the backend API

Example:
[
"http://localhost:8080",
"https://app.example.com"
]