diff --git a/src/Services/auth/O2NextGen.Auth.Web/Controllers/VersionController.cs b/src/Services/auth/O2NextGen.Auth.Web/Controllers/VersionController.cs new file mode 100644 index 00000000..c2c2f872 --- /dev/null +++ b/src/Services/auth/O2NextGen.Auth.Web/Controllers/VersionController.cs @@ -0,0 +1,44 @@ +using System; +using System.Reflection; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Logging; + +namespace O2NextGen.Auth.Web.Controllers +{ + + [AllowAnonymous] + public class VersionController : ControllerBase + { + #region Fields + + private readonly IHostingEnvironment _environment; + private readonly ILogger _logger; + + #endregion + + + #region Ctors + + public VersionController(IHostingEnvironment environment, ILogger logger) + { + _environment = environment; + _logger = logger; + } + + #endregion + + [HttpGet("[controller]")] + public object Index() + { + var exVersion = Assembly.GetExecutingAssembly().GetName().Version; + _logger.LogInformation($"get version - {exVersion}"); + return new + { + Environment = _environment.EnvironmentName, + Version = exVersion.ToString() + }; + } + } +} \ No newline at end of file diff --git a/src/Services/auth/O2NextGen.Auth.Web/Properties/launchSettings.json b/src/Services/auth/O2NextGen.Auth.Web/Properties/launchSettings.json index c1a63ed6..fabb4bd4 100644 --- a/src/Services/auth/O2NextGen.Auth.Web/Properties/launchSettings.json +++ b/src/Services/auth/O2NextGen.Auth.Web/Properties/launchSettings.json @@ -8,12 +8,12 @@ }, "applicationUrl": "https://localhost:10001;http://localhost:5001" }, - "Docker": { - "commandName": "Docker", - "launchBrowser": true, - "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}", - "publishAllPorts": true, - "useSSL": true - } + //"Docker": { + // "commandName": "Docker", + // "launchBrowser": true, + // "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}", + // "publishAllPorts": true, + // "useSSL": true + //} } } \ No newline at end of file diff --git a/src/Services/c-gen/O2NextGen.CertificateManagement.Api/Properties/launchSettings.json b/src/Services/c-gen/O2NextGen.CertificateManagement.Api/Properties/launchSettings.json index 32ab7244..9fced7d4 100644 --- a/src/Services/c-gen/O2NextGen.CertificateManagement.Api/Properties/launchSettings.json +++ b/src/Services/c-gen/O2NextGen.CertificateManagement.Api/Properties/launchSettings.json @@ -8,12 +8,12 @@ }, "applicationUrl": "https://localhost:10002;http://localhost:5002" }, - "Docker": { - "commandName": "Docker", - "launchBrowser": true, - "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}", - "publishAllPorts": true, - "useSSL": true - } + //"Docker": { + // "commandName": "Docker", + // "launchBrowser": true, + // "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}", + // "publishAllPorts": true, + // "useSSL": true + //} } } \ No newline at end of file diff --git a/src/Services/e-sender/O2NextGen.ESender.Api/Properties/launchSettings.json b/src/Services/e-sender/O2NextGen.ESender.Api/Properties/launchSettings.json index b872fc26..883992a7 100644 --- a/src/Services/e-sender/O2NextGen.ESender.Api/Properties/launchSettings.json +++ b/src/Services/e-sender/O2NextGen.ESender.Api/Properties/launchSettings.json @@ -26,12 +26,12 @@ }, "applicationUrl": "https://localhost:10004;http://localhost:5004" }, - "Docker": { - "commandName": "Docker", - "launchBrowser": true, - "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/api/values", - "publishAllPorts": true, - "useSSL": true - } + //"Docker": { + // "commandName": "Docker", + // "launchBrowser": true, + // "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/api/values", + // "publishAllPorts": true, + // "useSSL": true + //} } } \ No newline at end of file diff --git a/src/Services/smalltalk/O2NextGen.SmallTalk.Api/Properties/launchSettings.json b/src/Services/smalltalk/O2NextGen.SmallTalk.Api/Properties/launchSettings.json index 8e982cfc..f095286f 100644 --- a/src/Services/smalltalk/O2NextGen.SmallTalk.Api/Properties/launchSettings.json +++ b/src/Services/smalltalk/O2NextGen.SmallTalk.Api/Properties/launchSettings.json @@ -26,12 +26,12 @@ }, "applicationUrl": "https://localhost:10003;http://localhost:5003" }, - "Docker": { - "commandName": "Docker", - "launchBrowser": true, - "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/api/values", - "publishAllPorts": true, - "useSSL": true - } + //"Docker": { + // "commandName": "Docker", + // "launchBrowser": true, + // "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/api/values", + // "publishAllPorts": true, + // "useSSL": true + //} } } \ No newline at end of file