ปรับให้ระบบอ่านค่าจาก env ทั้งหมด
This commit is contained in:
@@ -98,10 +98,11 @@ namespace TodoAPI2.Controllers
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
//var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
var httpclient = new WebClient();
|
||||
string mainurl = Environment.GetEnvironmentVariable("JasperReportServer_MainURL");
|
||||
string reportsite = Environment.GetEnvironmentVariable("JasperReportServer_reportsite");
|
||||
string username = Environment.GetEnvironmentVariable("JasperReportServer_username");
|
||||
string password = Environment.GetEnvironmentVariable("JasperReportServer_password");
|
||||
|
||||
string mainurl = MyHelper.GetConfig(Configuration, "JasperReportServer:MainURL");
|
||||
string reportsite = MyHelper.GetConfig(Configuration, "JasperReportServer:reportsite");
|
||||
string username = MyHelper.GetConfig(Configuration, "JasperReportServer:username");
|
||||
string password = MyHelper.GetConfig(Configuration, "JasperReportServer:password");
|
||||
|
||||
string url = $"{mainurl}{reportsite}/rep_position_salary.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}&j_username={username}&j_password={password}";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user