Cross-Origin Resource Sharing




LiveView supports Cross-Origin Resource Sharing (CORS) by enabling one resource origin (for example, a LiveView server on the back end) to share LiveView data with another server (such as a customer's front end web server).

You configure origin resource sharing by setting a system property in a configuration file of HOCON type com.tibco.ep.ldm.configuration.ldmengine, which must reside in the src/main/configurations folder of your LiveView project in StreamBase Studio.

See Live Datamart Engine Configuration for more information regarding this file type's configuration options.

System property example:

name = "myldmengine"
version = "1.0.0"
type = "com.tibco.ep.ldm.configuration.ldmengine"
configuration = {
  LDMEngine = {
   systemProperties = {"liveview.server.allowedOrigins" = "*" }

The system property can contain a comma-separated list of origins that are allowed to access the resources, where an origin is defined by the scheme (protocol), host (domain), and port of the URL used to access it. Note that two objects are the same origin when the scheme, host, and port all match.

In the example above, the line "liveview.server.allowedOrigins" = "*" means all origins.

If an allowed origin contains one or more * characters (for example http://*, then * characters are converted to .* whereas . characters are escaped to \. and the resulting allowed origin interpreted as a regular expression. Allowed origins can therefore be more complex expressions such as https?://*.domain.[a-z] that matches http or https, multiple subdomains, and any three-letter top-level domain (such as .com, .net, .org, and so on).

Examples of Same Origins

The following examples contains the same origin because the scheme (http) and host ( are identical:

The following examples contains the same origin because a server delivers HTTP content through port 80 by default and case-insensitive:

Examples of Different Origins

The following examples contain different schemes:

The following examples contain different hosts:

The following examples contain different ports: