Routes
CGI Routes
The /em-cgi/*
routes are a set of developer utilities that return various useful datasets and offer some operational shortcuts.
Version
Responds with the current version and deployment track of the Edgemesh® Server instance running on the site.
Response Properties
https://example.com/em-cgi/utils/version
Configuration
Responds with the current configuration running on the site.
Response Properties
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.
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.
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.
https://example.com/em-cgi/utils/config
Geographic
Responds with the geo-location data for the requesting client.
Response Properties
https://example.com/em-cgi/utils/geo
Bot Score
Responds with the bot score for the requesting client.
Response Properties
NONE: Requesting client was not determined to be a crawler.
GOOGLE: Requesting client was determined to belong to Google.
APPLE: Requesting client was determined to belong to Apple.
MICROSOFT: Requesting client was determined to belong to Microsoft.
YANDEX: Requesting client was determined to belong to Yandex.
YAHOO: Requesting client was determined to belong to Yahoo.
BAIDU: Requesting client was determined to belong to Baidu.
DUCK_DUCK: Requesting client was determined to belong to Duck Duck Go.
FACEBOOK: Requesting client was determined to belong to Facebook.
TWITTER: Requesting client was determined to belong to Twitter.
LINKEDIN: Requesting client was determined to belong to LinkedIn.
OTHER: Requesting client was determined to belong to a platform we do not currently track. Check the User Agent for more info. If you would like to see a crawler agent added to the list, create a feature request.
https://example.com/em-cgi/utils/bot
Cache Proxy
This route allows a savvy developer to cache any arbitrary response. The request method does not matter. This allows you to easily cache applicable API responses easily, effectively speeding up a slow origin from a third or first party. Just make sure that whatever you are caching is not personalized or dynamic.
Request Parameters
https://example.com/em-cgi/cache/86400/swapi.dev/api/starships
Dynamic Content
This route extracts all dynamic content from the given pathname and returns a positionally accurate array of said content. This content is automatically requested and injected client side by javascript added by Edgemesh® Server, but this is also a good way to verify that the content you expect to be dynamic is in-fact changing the way you expect, without having to search through the elements inspector.
Request Parameters
https://example.com/em-cgi/dynamic
https://example.com/em-cgi/dynamic/collections/all
Purge Cache
Visiting this route will clear the Edgemesh® related Cache API caches for the requesting client's browser. This is useful for operational customer support when you may want a customer to clear their browser cache. With this route, you can just send a link to your customer rather than walking them through clearing their cache on their specific device.
Search Parameters
https://example.com/em-cgi/purge/cache?redirect=/pages/success
Purge Cookies
Visiting this route will clear the cookies for the requesting client's browser. This is useful for operational customer support when you may want a customer to clear their cookies. With this route, you can just send a link to your customer rather than walking them through clearing their cookies on their specific device.
Search Parameters
https://example.com/em-cgi/purge/cookies?redirect=/pages/success
Purge Local Storage
Visiting this route will clear the local storage for the requesting client's browser. This is useful for operational customer support when you may want a customer to clear their local storage. With this route, you can just send a link to your customer rather than walking them through clearing their local storage on their specific device.
Search Parameters
https://example.com/em-cgi/purge/local-storage?redirect=/pages/success
Purge Indexed DB
Visiting this route will clear the Edgemesh® related Indexed DB stores for the requesting client's browser. This is useful for operational customer support when you may want a customer to clear their Indexed DB. With this route, you can just send a link to your customer rather than walking them through clearing their Indexed DB storage on their specific device.
Search Parameters
https://example.com/em-cgi/purge/indexed-db?redirect=/pages/success
Purge Service Worker
Visiting this route will unregister the service worker on the requesting client's browser. This is useful for operational customer support when you may want a customer to unregister their service worker. With this route, you can just send a link to your customer rather than walking them through unregistering the service worker on their specific device.
Search Parameters
https://example.com/em-cgi/purge/service-worker?redirect=/pages/success
Purge All
Visiting this route will perform all the aforementioned purges in one step (cache, cookies, local storage, indexed db, and service worker). This is useful for operational customer support when you may want a customer to reset all of their browser's storage. With this route, you can just send a link to your customer rather than walking them through resetting storage on their specific device.
Search Parameters
https://example.com/em-cgi/purge/all?redirect=/pages/success