The components
- AAS Repository
- Submodel Repository
- Concept Description Repository
- AAS Environment
- AAS Registry
- Submodel Registry
- AAS Discovery
are highly configurable by leveraging the Spring framework. Thus, they utilize existing Spring configuration properties, e.g., for MongoDB. In addition, the components offer common mechanisms to check the current health status of the application and configure Cross-Origin Resource Sharing (CORS) options.
The health endpoint to check whether the server is up and running is available at:
http://{host}:{port}/actuator/health
For a detailed documentation on its configuration possibilities, see Spring Management Endpoint documentation.
Cross-Site Resource Sharing options can be configured under application.properties with the following attribute:
-
Allowed Origin Patterns:
Comma-separated list of origin patterns to allow. Unlike allowed origins which only supports '', origin patterns are more flexible (for example 'https://.example.com') and can be used when credentials are allowed. When no allowed origin patterns or allowed origins are set, CORS support is disabled.basyx.cors.allowed-origins=http://localhost:8080, https://*.example.com
-
Allowed Methods:
Comma-separated list of HTTP methods to allow. When not set, defaults to GET,HEAD,POST.basyx.cors.allowed-methods=GET,POST,PATCH,DELETE,PUT,OPTIONS,HEAD
The BaSyx V2 components use the Spring framework as described above. Due to this, all configuration options of Spring are also available for BaSyx. In consequence, each entry of the application.properties file can be configured via environment variables by replacing "." with "_" and capitalizing each letter.
As an example "basyx.backend" can be configured via the environment variable "BASYX_BACKEND".