Adds a new origin to a specified subdomain for dynamic CORS (Cross-Origin Resource Sharing) management.
POST/api/origin
This endpoint allows users to add origins that are permitted to access resources on their specified subdomains. The action is authenticated using a JWT, and the subdomain must be owned by the user making the request. This will be checked by the server.
Request
Header Parameters
'x-subdomain' header represents the name of the subdomain on which the action is to be performed.
- application/json
Body
required
Origin to be added
Responses
- 201
- 400
- 401
- 403
- 404
- 500
The origin was successfully added.
- application/json
- Schema
- Example (from schema)
Schema
Automatically generated id for new origin This can be used for further management
This duplicates origin from response payload to match REST specification
{
"id": "42",
"origin": "https://example.com/"
}
The 'x-subdomain' header is missing or contains invalid characters.
- application/json
- Schema
- Example (from schema)
Schema
This field will contain error information
{
"reason": "string"
}
Unauthorized: The JWT in the header is invalid or expired.
- application/json
- Schema
- Example (from schema)
Schema
This field will contain error information
{
"reason": "string"
}
Forbidden: The subdomain is owned by another user.
- application/json
- Schema
- Example (from schema)
Schema
This field will contain error information
{
"reason": "string"
}
Not Found: The login or subdomain was not found. See details for more information.
- application/json
- Schema
- Example (from schema)
Schema
This field will contain error information
{
"reason": "string"
}
Internal Server Error: An error occurred on the server.
- application/json
- Schema
- Example (from schema)
Schema
This field will contain error information
{
"reason": "string"
}