Locations
The API provides methods for flexible configuration of locations for a domain. Using these, you can create custom locations as well as configure headers and CORS for each of them. This allows you to optimally configure request handling for different parts of your website.
info
By default, the entire site uses the location "/" with basic settings.
location Object
| Parameter | Type | Description | Example |
|---|---|---|---|
| id | integer | Location ID | 1 |
| name | string | Location name | /images |
| type | string | Location type | matching |
| domain_id | integer | Domain ID | |
| headers | object[] | List of additional HTTP headers | |
| headers.key | string | Header name | X-MEDIA-TYPE |
| headers.value | string | Header value | .pptx |
| cors_headers | object{} | CORS headers object | |
| cors_headers.access_control_allow_origin | object[string] | ["example.com"] | |
| cors_headers.access_control_expose_headers | object[string] | ["Content-Encoding"] | |
| cors_headers.access_control_max_age | integer | 600 | |
| cors_headers.access_control_allow_credentials | boolean | true | |
| cors_headers.access_control_allow_methods | object[string] | ["OPTIONS"] | |
| cors_headers.access_control_allow_headers | object[string] | [*] |