Application settings¶
CxReports supports a number of settings that can be configured in the appsettings.json
file. The settings are divided into sections, each of which is described below.
Connection settings (required)¶
- Database: The connection string to the database where the reports are stored.
Example
Encryption (required)¶
- Key: The encryption key used to encrypt sensitive data in the database.
- Vector: The encryption vector used to encrypt sensitive data in the database.
LicenseConfiguration¶
You can set CxReports license key here, without logging into the application. This will also prevent anyone from removing the license key from the application.
Example
AppUrl¶
Used to specify the root URL of the application. This is needed in the process of automatic report generation.
PathBase¶
Used the specify the base path of the application. This in required if you are hosting CxReports in a subdirectory of a domain. For example, if you are hosting CxReports in https://example.com/reports
, you should set the PathBase
to /reports
. It can be omitted if the application is hosted in the root of the domain.
Password Policy¶
Settings for the password policy. The password policy is used to enforce password complexity rules.
Example
RootUser¶
Initial user that will be created when the application starts. This user will have the role of Administrator
and will have full access to the application. In case you loose access to the app, you can use this setting to create a new user with full access.
Example
"RootUser": {
"Email": "[email protected]",
"Password": "a",
"DisplayName": "AA"
}
SmtpServer¶
Settings for the SMTP server that will be used to send emails. This is needed for sending reports via email. Throttling settings can be omitted if you don't want to throttle the number of emails sent in a given interval (in seconds)
Example
"SmtpServer": {
"From": "[email protected]",
"ReplyTo": "[email protected]",
"Host": "localhost",
"Port": 1025,
"Username": "",
"Password": "",
"EnableSsl": false,
"DegreeOfParallelism": 10
"Throttling": {
"MaxEmailsPerInterval": 2,
"ThrottleInterval": 1
}
}
Swagger¶
Settings for the Swagger UI. Swagger is a tool that helps you document and test your API. It is available at /swagger
endpoint.
Hangfire¶
Settings for the Hangfire dashboard. Hangfire is a tool that helps you manage background jobs. It is available at /hangfire
endpoint.
Puppeteer¶
Puppeteer is used for report exports. In case you want to use a custom puppeteer executable, you can specify the path to it here.
Serilog¶
Settings for the Serilog logger. Serilog is a logging library that is used to log application events. More information available here
Google Login (^1.13.0)¶
Settings for the Google login. This is used to enable Google login in the application.
Example
Microsoft Login (^1.13.0)¶
Settings for the Microsoft login. This is used to enable Microsoft login in the application.
Example
Password login¶
This settings is used to disable or enable email/password login. By default, email/password login is enabled.