Application Settings
Endatix API exposes application settings, which allow you to configure the behavior of the applicaiton. They are part of the ASP.NET Core configuration framework and support per environment variations similar to .env files with note. More about ASP.NET Configuration here.
For each project that you have setup via the NuGet packages, you can apply the settings via the respective appsettings.{Environment}.json
files there. By convention all settings will be part of the Endatix object in the root of your settings, so there's virtually no change of name colission with other settings you might have.. an it's also cleaner. Here is an example:
{
"ConnectionStrings": {...
},
"Serilog": {...
},
"Endatix": {
"Data": {...
},
"Jwt": {...
},
"Cors": {...
}
}
}
The files are by default shipped with your Endatix.WebHost
application located in src\Endatix.WebHost
. There you will see 2 files:
appSettings.Development.json
- used for Development settingsappSettings.json
- used for default settings.
It’s recommended to use an appSettings.Production.json
file for your production environment to keep sensitive configurations, such as API keys and connection strings, separate from development settings. This ensures that production-specific settings are securely managed and reduces the risk of accidentally exposing sensitive data during development or deployment.
📄️ Data Settings
Data settings are responbile for changing the behavior of the data persistance layer. They allow you to prevent or allow running data migrations of the DB schema
📄️ JWT Settings
JWT (JSON Web Token) settings control the authentication and authorization mechanisms in Endatix. These settings are essential for securing your API and client interactions, ensuring that only authorized users can access protected resources.
📄️ CORS Settings
This guide will help you configure CORS (Cross-Origin Resource Sharing) settings for the Endatix application. By default if you omit the settings default CORS settings will be applied: