You can use the configuration parameters in appSettings.json to control the Web API behavior.
The appSettings.json file
stores the configuration of the Web API. It is found in the Web API installation folder, at
C:\Program Files (x86)\Genetec\Genetec Mission Control Web API\ by
default.
The following table lists the configuration parameters:
Parameter | Description |
---|---|
Serilog
|
Top-level parameter of the Web API logging configuration. Serilog is a
.NET library that captures diagnostic information using log sinks. The
following log sinks are integrated with the Web API and are enabled by default:
For more information on configuring Serilog, see the descriptions of serilog-sinks-file and serilog-sinks-eventlog on GitHub. |
AllowedHosts
|
Semicolon-separated list of host headers that are allowed to connect to
the Web API. If the local server uses virtual hosting, use this list to
specify which hosts accept connections to the Web API. By default, an
asterisk (*) is used to specify all virtual hosts. See the Microsoft documentation for allowed values and more information. |
Port
|
Sets the listening port for the Web API. By default, port 9550 is used. |
EnableWebDocumentation
|
Enables access to developer documentation for the Web API. By default, false is used to ensure that the developer documentation is only enabled when needed. |
AllowedOrigins
|
Enables cross-origin requests (CORS) to the Web API. It is a whitelist
of domains that can access the Web API from a browser. For
example:
For more information, refer to Microsoft documentation on how CORS works . |