Endpoints and configuration files - acrotron-spezvuz/auralization-proto GitHub Wiki
API
Endpoints
- /swagger or /index.html - endpoints for Swagger UI
- /api/auralization - auralization endpoint, wrapper of NAFlib
Configuration files
- nlog.config - configuration for NLog logging package
- appsettings.json - configuration for production environment
- appsettings.Development.json - configuration for development environment
- appsettings.< Environment >.json - configuration for < Environment > environmont
{
"Logging": {
"LogLevel": {
"Default": "Trace",
"Microsoft": "Information"
}
},
"AllowedOrigins": [
"an-url-of-the-spa-project"
]}
AllowedOrigins is for CORS, it is a list of domains as shown above. Only allowed domains can make a cross-domain requests to the api. Basically this list contain only one item: an URL of the SPA project without trailing slash '/'. Example:
- Production configuration:
"AllowedOrigins": [ "http://auralization.us-east-1.elasticbeanstalk.com"]
- Development configuration:
"AllowedOrigins": [ "https://localhost:44395"]
- Standalone IIS configuration depends on selected domain names.
SPA
Endpoints
- / or /index.html - main web page, auralization source and results
- /api/config - configuration endpoint, returns an url of the auralization api
Configuration files
- appsettings.json - configuration for production environment
- appsettings.Development.json - configuration for development environment
- appsettings.< Environment >.json - configuration for < Environment > environmont
{
"ApiSettings": {
"AuralizaitionEndpoint": "an-url-of-the-api-project"
}}
AuralizaitionEndpoint is a url to the API project. Example:
- production configuration:
"AuralizaitionEndpoint": "http://auralization-api.us-east-1.elasticbeanstalk.com/api/Auralizarion"
- Development configuration:
"AuralizaitionEndpoint": "https://localhost:44321/api/Auralizarion"
- Standalone IIS configuration depends on selected domain names.