diff --git a/src/routes/cufs.js b/src/routes/cufs.js index b1e1fd5..eeac68b 100644 --- a/src/routes/cufs.js +++ b/src/routes/cufs.js @@ -32,6 +32,7 @@ router.post("/:symbol/Account/LogOn", (req, res) => { router.get("/:symbol/FS/LS", (req, res) => { res.render("login-cert", { + symbol: req.param("symbol"), cert: fs.readFileSync("public/cert.xml", "utf8"), uonetplusOpiekun: protocol(req) + "://" + req.get('host').replace("cufs.", "uonetplus.") }); diff --git a/src/views/login-cert.pug b/src/views/login-cert.pug index 4afe8ed..227b6ae 100644 --- a/src/views/login-cert.pug +++ b/src/views/login-cert.pug @@ -3,10 +3,10 @@ html head title Working... body - form(method="POST" name="hiddenform" action=uonetplusOpiekun + "/powiatwulkanowy/LoginEndpoint.aspx") + form(method="POST" name="hiddenform" action=uonetplusOpiekun + "/" + symbol + "/LoginEndpoint.aspx") input(type="hidden" name="wa" value="wsignin1.0") input(type="hidden" name="wresult" value=cert) - input(type="hidden" name="wctx" value=uonetplusOpiekun + "/powiatwulkanowy/LoginEndpoint.aspx") + input(type="hidden" name="wctx" value=uonetplusOpiekun + "/" + symbol + "/LoginEndpoint.aspx") noscript p Script is disabled. Click Submit to continue.