Config Server

The Edgemesh® Server configuration provides various options that can be set in the Portal and by the API. These options define how Edgemesh® Server will operate on your site.

Get Config

GET

Returns the current Edgemesh® Server configuration.

Request Parameters


REQUIRED
The hostname of the domain to retrieve the configuration for.

Response Properties


cdnTrack
string (stable | canary | nightly)
The deployment track for Edgemesh® Client and other static resources.
  • stable: Production track. All customers run on this track unless a new feature is being tested on a customer's behalf.
  • canary: This track is for testing features that are stable and ready to be promoted to production. Customers can set their staging sites to this track in order to run integration tests with new features.
  • nightly: This track is used to test potentially unstable new features. Customer's production sites are never set to this track. Only staging sites are eligible for this track.

apiTrack
string (stable | canary | nightly)
The deployment track for Edgemesh® API.
  • stable: Production track. All customers run on this track unless a new feature is being tested on a customer's behalf.
  • canary: This track is for testing features that are stable and ready to be promoted to production. Customers can set their staging sites to this track in order to run integration tests with new features.
  • nightly: This track is used to test potentially unstable new features. Customer's production sites are never set to this track. Only staging sites are eligible for this track.

workerTrack
string (stable | canary | nightly)
The deployment track for Edgemesh® Server.
  • stable: Production track. All customers run on this track unless a new feature is being tested on a customer's behalf.
  • canary: This track is for testing features that are stable and ready to be promoted to production. Customers can set their staging sites to this track in order to run integration tests with new features.
  • nightly: This track is used to test potentially unstable new features. Customer's production sites are never set to this track. Only staging sites are eligible for this track.

Edge caching enabled.

The cache revalidation time in seconds. Pages will be continuously revalidated, but other resources are revalidated on an interval.

When no cache control header is present on a resource, Edgemesh® sets a default header. This value is the s-maxage, or the time the resource will be cached at the edge.

Enables the tag-less tracking and analytics data collection.

Dynamic pre-rendering enabled. Bots and search engines will be served a pre-rendered version of the page. Pre-rendered pages are faster and better for indexing, but lack interactivity.

Enables the image optimization feature.

The default quality for image optimization. This value can be overridden for a specific image via the em-quality search parameter. The default of 75 is a good balance between clarity and performance.

Enables ad fraud and bot traffic protection.

Un-shard image src and srcset attributes.

unshardCss
boolean
Un-shard stylesheet href attributes and stylesheet content

Un-shard script tag src attributes.

minifyHtml
boolean
Minifies HTML content and strips comments.

minifyCss
boolean
Minifies stylesheet content and strips comments.

Minifies javascript content and strips comments.

Inject the Edgemesh® Client script.

Enables the Shopify plugin.
URL
https://api.edgemesh.com/2022-08/config/server
GETGet Client Config
1curl https://api.edgemesh.com/2022-08/config/server?hostname=example.com /
2 -H 'Accept: application/json' /
3 -H 'X-API-Key: EM-0000000-0000000-0000000-0000000'
Example Response
1{
2 "apiTrack": "stable",
3 "cdnTrack": "stable",
4 "workerTrack": "stable",
5 "enableCaching": true,
6 "revalidateTime": 900,
7 "defaultMaxAge": 604800,
8 "enableAnalytics": true,
9 "enablePrerender": true,
10 "enableImageOptimization": true,
11 "defaultImageQuality": 75,
12 "enableBotProtection": true,
13 "unshardImages": true,
14 "unshardCss": true,
15 "unshardScripts": true,
16 "minifyHtml": true,
17 "minifyCss": true,
18 "minifyScripts": true,
19 "injectClient": true,
20 "shopifyPlugin": true
21}

Update Config

PUT

Update the Edgemesh® Client configuration. Any of the configuration options set in the request body will be updated. The omitted options will remain unmodified.

Request Parameters


hostname
string
REQUIRED
The hostname of the domain whose cache will be purged.

cdnTrack
string (stable | canary | nightly)
OPTIONAL
The deployment track for Edgemesh® Client and other static resources.
  • stable: Production track. All customers run on this track unless a new feature is being tested on a customer's behalf.
  • canary: This track is for testing features that are stable and ready to be promoted to production. Customers can set their staging sites to this track in order to run integration tests with new features.
  • nightly: This track is used to test potentially unstable new features. Customer's production sites are never set to this track. Only staging sites are eligible for this track.

apiTrack
string (stable | canary | nightly)
OPTIONAL
The deployment track for Edgemesh® API.
  • stable: Production track. All customers run on this track unless a new feature is being tested on a customer's behalf.
  • canary: This track is for testing features that are stable and ready to be promoted to production. Customers can set their staging sites to this track in order to run integration tests with new features.
  • nightly: This track is used to test potentially unstable new features. Customer's production sites are never set to this track. Only staging sites are eligible for this track.

workerTrack
string (stable | canary | nightly)
OPTIONAL
The deployment track for Edgemesh® Server.
  • stable: Production track. All customers run on this track unless a new feature is being tested on a customer's behalf.
  • canary: This track is for testing features that are stable and ready to be promoted to production. Customers can set their staging sites to this track in order to run integration tests with new features.
  • nightly: This track is used to test potentially unstable new features. Customer's production sites are never set to this track. Only staging sites are eligible for this track.

OPTIONAL
Edge caching enabled.

OPTIONAL
The cache revalidation time in seconds. Pages will be continuously revalidated, but other resources are revalidated on an interval.

OPTIONAL
When no cache control header is present on a resource, Edgemesh® sets a default header. This value is the s-maxage, or the time the resource will be cached at the edge.

OPTIONAL
Enables the tag-less tracking and analytics data collection.

OPTIONAL
Dynamic pre-rendering enabled. Bots and search engines will be served a pre-rendered version of the page. Pre-rendered pages are faster and better for indexing, but lack interactivity.

Enables the image optimization feature.

OPTIONAL
The default quality for image optimization. This value can be overridden for a specific image via the em-quality search parameter. The default of 75 is a good balance between clarity and performance.

OPTIONAL
Enables ad fraud and bot traffic protection.

OPTIONAL
Un-shard image src and srcset attributes.

unshardCss
boolean
OPTIONAL
Un-shard stylesheet href attributes and stylesheet content

OPTIONAL
Un-shard script tag src attributes.

minifyHtml
boolean
OPTIONAL
Minifies HTML content and strips comments.

minifyCss
boolean
OPTIONAL
Minifies stylesheet content and strips comments.

OPTIONAL
Minifies javascript content and strips comments.

OPTIONAL
Inject the Edgemesh® Client script.

OPTIONAL
Enables the Shopify plugin.

Response Properties


ok
boolean
Whether or not the request succeeded.
URL
https://api.edgemesh.com/2022-08/config/server
PUTUpdate Server Config
1curl https://api.edgemesh.com/2022-08/config/server /
2 -X PUT /
3 -H 'Accept: application/json' /
4 -H 'X-API-Key: EM-0000000-0000000-0000000-0000000' /
5 -d '{ "proxy": "foo.com", "apiTrack": "stable", "cdnTrack": "stable", "workerTrack": "stable", "cookies": "off", "enableCaching": true, "enableBotAnalytics": true, "enableBotProtection": true, "enableImageOptimization": true, "enablePrerender": true, "unshardCss": true, "unshardImages": true, "unshardScripts": true, "unshardCssContent": true, "minifyHtml": true, "minifyCss": true, "minifyScripts": true, "injectEdgemesh": true, "shopifyPlugin": false }'
Example Response
1{
2 "ok": true
3}

Made withby Edgemesh Corporation