Adding subdomain settings to a subdomain¶
Note
All attributes of the object SubdomainSettingVO must be defined. Attributes that are not defined automatically receive the default value.
Note
Subdomain settings are not updated but always created anew. The Create-Subdomain-Settings request is at the same time the Change-Subdomain-Settings request.
Sends a POST request to the endpoint /domain/{domainId}/{vHostName}/settings.
Description¶
The Add-Subdomain-Settings request allows the user to add subdomain settings for a subdomain of the organisation.
Requirements¶
Values of the request: Domain-ID {domainId}, Subdomain name {vHostName}
Objects: SubdomainSettingVO
Request¶
To add subdomain settings for a subdomain, the Domain-ID {domainId} and the Subdomain name {vHostName} need to be added to the path of the request.
For a detailed specification of which information is required to add subdomain settings, the object SubdomainSettingVO with the following attributes needs to be defined in the body:
| Attributes | Description | Values |
|---|---|---|
accept_encoding |
||
access_log |
(Logging) Enables or disables the access log. | Default value: falsePossible values:
|
antibot_post_flood |
(Security) Enables or disables the detection of POST floods by using a JavaScript based puzzle. | Default value: falsePossible values:
|
antibot_post_flood_threshold |
(Security) The parameter that determines how frequently the puzzle must be solved. The higher the value, the less likely it is that the puzzle must be solved. | Default: 20 Possible values: 0 to 100 |
antibot_proof_of_work |
(Security) Enables or disables the JavaScript-based bot detection. Bots are then automatically blocked when accessing your website. | Default value: falsePossible values:
|
antibot_proof_of_work_threshold |
(Security) The parameter that determines how frequently the puzzle must be solved. The higher the value, the less likely it is that the puzzle must be solved. | Default: 20 Possible values: 0 to 100 |
balancing_method |
(Connection) The method requests for the balancing between upstream servers. | Default: round_robin Possible values:
|
block_ip_by_header |
||
block_not_whitelisted |
(Security) Enables or disables the blocking of all IPs which are not whitelisted. | Default value: falsePossible values:
|
block_tor_network |
(Security) Enables or disables the blocking of traffic from the TOR network. | Default value: falsePossible values:
|
bot_calc_fingerprint |
||
bot_customer_regex_0 |
||
bot_customer_regex_1 |
||
bot_customer_regex_2 |
||
bot_external_session_id |
||
cache_enabled |
(Performance) Enables or disables caching. If you enable the cache, you must also define the objects to be cached in the cache settings. | Default value: falsePossible values:
|
cache_revalidate |
(Performance) Enables or disables if expired cache items will be requested with the additional HTTP header If-Modified-Since and If-None-Match. | Default value : truePossible values:
|
cache_sort_active |
||
client_max_body_size |
(Connection) The maximum allowed size of the client request body, specified in the Content-Length request header field. | Default: 10 MB Possible values: up to 5120 MB |
diffie_hellman_exchange |
(Security) The size of the Diffie-Hellman key exchange parameters in bits. Note that Java 6 and 7 do not support Diffie-Hellman parameters larger than 1024 bits. | Default value: 1024Possible values:
|
disable_accept_encoding |
||
disable_forwarded_for |
(Connection) Enables or disables the X-Forwarded-For-Header for transferring the IP address of the visitor. | Default value: falsePossible values:
|
enable_origin_sni |
(Security) The availability of the origin SNI. | Default value : truePossible values:
|
enforce_cache_ttl |
(Performance) The availability of the setting to force the cache TTL settings instead of the cache information of the customer infrastructure. | Default value: falsePossible values:
|
forwarded_for_replacement |
(Connection) The X-Forwarded-For header name. | Default: X-Forwarded-For Possible values: A valid HTTP header name |
host_header |
(Expert) The Proxy Host header name. | Default value: $myra_host |
hsts |
(Security) Enables or disables the web security policy mechanism which helps to protect websites against protocol downgrade attacks and cookie hijacking. | Default value: falsePossible values:
|
hsts_include_subdomains |
(Security) Enables or disables that all subdomains are included in the HSTS protection. | Default value: falsePossible values:
|
hsts_max_age |
(Security) The time in seconds for allowing only HTTPS encrypted connections. | Default: 31536000 Possible values: 0 to 2147483647 |
hsts_preload |
(Security) Enables or disables the adding of the domain to the HSTS preload list (hstspreload.appspot.com). | Default value: falsePossible values:
|
http_origin_port |
||
ignore_nocache |
(Performance) Enables or disables if no-cache headers will be ignored. | Default value: falsePossible values:
|
image_optimization |
(Performance) Enables or disables the lossless optimisation of JPEG and PNG images. | Default value : truePossible values:
|
ipv6_active |
(Connection) Enables or disables the allowance for connections via IPv6 to your systems. | Default value : truePossible values:
|
limit_allowed_http_method |
(Security) An array of all allowed HTTP methods. HTTP methods that are not selected are blocked. | Default value: empty Possible values:
|
limit_tls_version |
(Security) An array of all allowed TLS versions. Only selected TLS versions are used. | Default values:
|
log_format |
(Logging) The log format for the access logs. A list of all possible formats is available from the service support. | Default value: myra-combined |
monitoring_alert_threshold |
(Monitoring) The errors per minute that must occur until a report is sent. | Default value: 300 |
monitoring_contact_email |
(Monitoring) The email addresses to which monitoring emails are to be sent. Multiple addresses are separated by a space. | Default value: empty |
monitoring_send_alert |
(Monitoring) Enables or disables the upstream error reporting. | Default value: falsePossible values:
|
myra_ssl_certificate |
(Security) An SSL/TLS certificate (and the chain) used for requests to the customer infrastructure. | Default value: empty |
myra_ssl_certificate_key |
(Security) The private key for the SSL/TLS Certificate. | Default value: empty |
myra_ssl_header |
(Security) Enables or disables the X-Myra-SSL/TLS Header, which indicates if a request was received via SSL. | Default value: falsePossible values:
|
next_upstream |
(Expert) An array of the errors that mark the current upstream as down. | Default value:
|
only_https |
(Connection) Enables or disables if requests always will be redirected to HTTPS. | Default value: falsePossible values:
|
origin_connection_header |
(Expert) The connection header transmitted with a request to the customer infrastructure. | Default: none Possible values:
|
proxy_cache_bypass |
(Expert) The name of the cookie that forces Myra not to serve the response from the cache. The values of the cookie must not be empty or equal to 0 for the bypass to be enabled. | Default value: empty |
proxy_cache_lock_age |
||
proxy_cache_lock_timeout |
||
proxy_cache_min_uses |
||
proxy_cache_stale |
(Expert) An array with error cases during communication with the upstream server where a stale cached response should be used. | Default value: updatingPossible values:
|
proxy_connect_timeout |
(Expert) A timeout in seconds for establishing the connection to the customer infrastructure. The timeout must not be greater than 60 seconds. | Default: 20 Possible values: 1 to 60 |
proxy_read_timeout |
(Expert) A timeout in seconds for reading a response from the proxy server. The timeout applies only between two consecutive read operations, not to the transfer of the entire response. | Default value: 1200Possible values:
|
proxy_send_timeout |
||
proxy_ssl_name |
||
proxy_ssl_trusted_certificate |
||
proxy_ssl_verify |
||
proxy_ssl_verify_depth |
||
request_limit_block |
(Expert) Enables or disables if the user has to solve a CAPTCHA after exceeding the configured request limit. | Default value: falsePossible values:
|
request_limit_level |
(Connection) A request limit for allowed requests of an IP per minute. If the limit is reached, the IP is blocked and a CAPTCHA is shown to release the IP again. | Default: 6000 Possible values: 0 to 65535 |
request_limit_report |
(Expert) Enables or disables if an email will be sent containing blocked IP addresses that exceeded the configured request limit. | Default value: falsePossible values:
|
request_limit_report_email |
(Expert) An email address to which emails about the request limit are to be sent. Multiple addresses are separated by a space. | Default value: empty |
request_limit_timeframe |
||
rewrite |
Shows whether the automatic JavaScript optimisation is used. All JavaScript is collected and executed at the end of the page. This significantly reduces the DOM content loaded time. If not all JavaScript files are to be collected, you can set the value to regex and specify the regex to be used for matching the file names in the rewrite_regex option. | Default value: falsePossible values:
|
source_port |
(Connection) A port for communication with the customer infrastructure via HTTP. | Default value: 80 |
source_protocol |
(Connection) The protocol used for querying the customer infrastructure: HTTP or HTTPS. | Default value: samePossible values:
|
spdy |
(Connection) Enables or disables the high-performance HTTP/2 protocol. Note that HTTPS must be enabled for Myra to enable HTTP/2. | Default value: falsePossible values:
|
ssl_client_certificate |
(Security) A trusted CA certificate in the PEM format used to verify client certificates. | Default value: empty |
ssl_client_header_fingerprint |
(Security) The fingerprint of the certificate the client used to authenticate itself. | Default: X-MYRA-SSL-Fingerprint |
ssl_client_header_verification |
(Security) The name of the header, which contains the SSL/TLS verification status. | Default: X-MYRA-SSL-VERIFIED |
ssl_client_verify |
(Security) Enables or disables the verification of client certificates. | Default value: falsePossible values:
|
ssl_origin_port |
(Security) The port for communication with the customer infrastructure via SSL. | Default value: 443 |
waf_enable |
(Security) Enables or disables the Web Application Firewall. | Default value: falsePossible values:
|
waf_levels_enable |
(Security) An array of the hierarchy of the WAF. | Default:
|
waf_policy |
(Security) The default policy for the Web Application Firewall in case of rule error. | Default value: allowPossible values:
|
ip_lock |
(Connection) Enables or disables the prevention for accidental Myra IP address changes after updating an SSL/TLS certificate. | Default value : truePossible values:
|
The system returns the object SubdomainSettingVO with the changed information.
Example¶
Example request body:
{
"accept_encoding": [
"string"
],
"access_log": true,
"antibot_post_flood": true,
"antibot_post_flood_threshold": 0,
"antibot_proof_of_work": true,
"antibot_proof_of_work_threshold": 0,
"availability_zones": "string",
"balancing_method": "string",
"block_ip_by_header": "string",
"block_not_whitelisted": true,
"block_tor_network": true,
"bot_block_ai_category": true,
"bot_calc_fingerprint": true,
"bot_customer_regex_0": "string",
"bot_customer_regex_1": "string",
"bot_customer_regex_2": "string",
"bot_external_session_id": "string",
"cache_enabled": true,
"cache_revalidate": true,
"cache_sort_active": true,
"cdn": true,
"client_max_body_size": 0,
"comment": "string",
"cookie_name": "string",
"diffie_hellman_exchange": 0,
"disable_accept_encoding": true,
"disable_forwarded_for": true,
"enable_origin_sni": "string",
"enforce_cache_ttl": true,
"forwarded_for_replacement": "string",
"host_header": "string",
"hsts": true,
"hsts_include_subdomains": true,
"hsts_max_age": 0,
"hsts_preload": true,
"http_origin_port": 0,
"ignore_nocache": true,
"image_optimization": true,
"ip_lock": true,
"ipv6_active": true,
"limit_allowed_http_method": [
"string"
],
"limit_tls_version": [
"string"
],
"log_archive_format": "string",
"log_format": "string",
"monitoring_alert_threshold": 0,
"monitoring_contact_email": "string",
"monitoring_send_alert": true,
"myra_ssl_certificate": [
"string"
],
"myra_ssl_certificate_key": [
"string"
],
"myra_ssl_header": true,
"next_upstream": [
"string"
],
"nginx_filter": "string",
"nginx_filter_inject_type": "string",
"nginx_server_inject": "string",
"nginx_server_inject_type": "string",
"nginx_ssl_server_inject": "string",
"nginx_ssl_server_inject_type": "string",
"nginx_ssl_upstream_inject": "string",
"nginx_ssl_upstream_inject_type": "string",
"nginx_upstream_inject": "string",
"nginx_upstream_inject_type": "string",
"objectType": "string",
"only_https": true,
"origin_connection_header": "string",
"proxy_cache_bypass": "string",
"proxy_cache_key": "string",
"proxy_cache_lock_age": 0,
"proxy_cache_lock_timeout": 0,
"proxy_cache_min_uses": 0,
"proxy_cache_stale": [
"string"
],
"proxy_connect_timeout": 0,
"proxy_read_timeout": 0,
"proxy_send_timeout": 0,
"proxy_ssl_name": "string",
"proxy_ssl_session_reuse": true,
"proxy_ssl_trusted_certificate": [
"string"
],
"proxy_ssl_verify": true,
"proxy_ssl_verify_depth": 0,
"request_limit_block": "string",
"request_limit_level": 0,
"request_limit_report": true,
"request_limit_report_email": "string",
"request_limit_timeframe": 0,
"rewrite": true,
"source_port": 0,
"source_protocol": "string",
"spdy": true,
"ssl_client_certificate": [
"string"
],
"ssl_client_header_fingerprint": "string",
"ssl_client_header_verification": "string",
"ssl_client_verify": "string",
"ssl_origin_port": 0,
"waf_enable": true,
"waf_levels_enable": [
"string"
],
"waf_policy": "string",
"websocket_connection": "string"
}
Responses¶
The following responses are available:
| STATUS CODE | DESCRIPTION |
|---|---|
| 201 | The request has succeeded and a new object has been created. |
| 400 | The request was unsuccessful. The request was invalid or information is missing. |
| 401 | The request has not succeeded because the user authentication was incorrect. |
| 403 | The request has not succeeded because the user does not have the right permissions. |