post
https://{instance_zuid}.api.zesty.io/v1/env/settings
This creates a new env settings. Available request body property values.
Body: raw JSON
| name | description |
|---|---|
| category | [string] Required. Unique. This will appear in the manager-ui. |
| keyFriendly | [string] Required. Name that will be visible as label in the manager-ui |
| key | [string] Required. A unique no-space identifier for this setting object. |
| value | [string] Required. The default value. |
| admin | [boolean] Required. If this settings can only be access by Admin users. |
| parselyAccess | [boolean] Required. If this settings can be access in parsely. |
| dataType | [string] Required. Values can be either checkbox, textarea, text or dropdown |
| options | [string] Optional comma-separated string that will be used by checkbox and dropdown datatypes. |
| tips | [string] Optional description that will be shown via a tooltip. |
Notes
- if
dataTypeis set to"dropdown"optionsmust contain a string value that follows this structure"key1:value1key2:value2..." - if
dataTypeis set to"checkbox"optionsmust contain a string value that follows this structure"value1,value2"
Available Webengine settings:
| routing | key | key_friendly | description |
|---|---|---|---|
| general | site_protocol | forces TLS redirect if https. Possible value: https:http | |
| general | always_redirect_to_https | 1 force redirect to https, 0 ignore. Default value is 0 | |
| general | preferred_domain_prefix | 1 force add www, 0 ignore. Default value is 0 | |
| general | base_directory | ||
| general | add_lang_code_to_paths | Appends the language code after the domain before the full path. | |
| general | dnt-policy | Adds DNT header (do not track) if 1, ignored if 0. Default value is 0. | |
| general | robots_text | Appends the given string to the Robots.txt file. | |
| general | robots_on | 1 Tells crawlers to crawl, 0 tells crawlers no crawling. Default value is 1. | |
| general | show_domain_in_title | Add " | |
| general | show_in_title | legacy fallback to show_domain_in_title. Default value is 1. | |
| general | media_proxy_url | Media Proxy URL | URL used to proxy your media assets. See https://zesty.org/services/media-storage-micro-dam/micro-dam-domains. |
| developer | permanent_redirect | Force redirects requested page to the URL stated, and appends path and query string, ignore if empty string | |
| developer | ajax_cors_allow_any_origin | Restricts request to the origin specified, * is any. Defaul value is *. | |
| developer | gql | Turn on access to GraphQL endpoints to run an Appollo GQL Server | 1 Turns on GraphQL endpoints, 0 turn off. Default value is 0. |
| developer | gql_origin | GraphQL Allow Origin | Restricts request to the origin specified, * is any. Defaul value is *. |
| developer | auto_include_js_in_head | Adds the script link to the compiled javascript file that Zesty make from all js files. Default value is 1. | |
| developer | basic_content_api_enabled | Access to Instant JSON API for content. | [checkbox] |
| developer | overwrite_head | ||
| developer | permanent_redirect | 301 Redirect every request to a different website by appending the query parameter to the given domain name. | |
| security | limit_dev_site_to_ip_whitelist | 403s to any IP not listed in when preview resolves, ignore if empty string. | |
| security | limit_live_site_to_ip_whitelist | 403s to any IP not listed in when production resolves, ignore if empty string. | |
| security | x_frame_options | Header: X-Frame-Options | Adds response header 'X-Frame-Options'. See MDN docs. Default value is *. |
| security | strict_transport_security | Strict-Transport-Security | Adds response header 'Strict-Transport-Security'. See MDN docs. |
| security | content_security_policy | Content-Security-Policy | Adds response header 'Content-Security-Policy'. See MDN docs. |
| security | x_content_type_options | X-Content-Type-Options | Adds response header 'X-Content-Type-Options'. See MDN docs. Default value is nosniff. |
| security | referrer_policy | Referrer-Policy | Adds response header 'Referrer-Policy'. See MDN docs. Default value is unsafe-url. |
| security | feature_policy | Feature-Policy | Adds response header 'Feature-Policy' . See MDN docs. |
| security | preview_lock | [checkbox] This option on preview the preview url from being accessed when a user is not logged in. | |
| security | preview_lock_password | Password used to allow non-authenticated zesty users view this preview. | |
| routing | friendly_pagination | Default value is 0 | |
| contact-form | honeypot | Form Honey Pot | Value checked in a Zesty lead form post request, used to prevent bot submission, ignored if empty string |
| contact-form | safe_emails | An allow list for override emails in a form submission | |
| contact-form | sending_email | The email address thtat is used to send from when a ZCF hidden value exists on a form. | |
| contact-form | email_override | Sends an email to the email given when a Zesty contact form is submitted. | |
| seo | canonical_tags_enabled | Values available are 0 for CANONICAL_MODE_OFF, 1 for CANONICAL_MODE_ON_STRIP_PARAMS, 2 for CANONICAL_MODE_ON_WHITELIST_PARAMS, and 3 for CANONICAL_MODE_ON_CUSTOM_PATH. | |
| seo | automated_feed_xml | Automated feed.xml | Turns on/off auto generated /feed.xml. Default value is 1 |
| tag_managers | gtm_id | Adds google tag manager script to the html head using the given value, if empty ignored. | |
| analytics | google_urchin_id | Adds google analytics tag to the html head. | |
| analytics | universal_code | Adds google analytics universal tag to the html head. Default value is 1. | |
| analytics | google_auto_linker | Comma-separated domains (no quotes). Adds ga('linker:autoLink', ['domain','domain']) to the universal google tag output. | |
| analytics | display_advertising_support | Adds ga('require', 'displayfeatures'); to universal tag output. | |
| groupby | client_key | GroupBy Client Key | Secret Key used to make requests for the configured endpoint. |
| groupby | collection | GroupBy Default Collection | GroupBy collection to access. |
| groupby | url | GroupBy Client Endpoint | GroupBy API URL base. |
| proxy | dev | Root URL to proxy file store | The key is the branch. Attempts to resolve a file at the the proxy url for dev preview. |
| proxy | live | Root URL to proxy file store | The key is the branch. Attempts to resolve a file at the the proxy url for live/prod. |
| i18n | default_page | Default i18n page sets <link rel="alternate" href="' .$_Z['SETTINGS']['i18n']['default_page'] . '" hreflang="x-default" />. Default value is relative path /i18n/. |
