Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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<VersionController> _logger;

#endregion


#region Ctors

public VersionController(IHostingEnvironment environment, ILogger<VersionController> 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()
};
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
//}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
//}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
//}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
//}
}
}