Replace endpoints links in messages root to page with forgery token

This commit is contained in:
Mikołaj Pich 2020-01-10 23:47:52 +01:00
parent c9712d2c25
commit 7b08b17c48
2 changed files with 17 additions and 0 deletions

View file

@ -4,6 +4,10 @@ const protocol = require('../utils/connection');
const md5 = require('md5');
router.get("/", (req, res) => {
res.render("messages");
});
router.get("/-endpoints", (req, res) => {
const base = protocol(req) + "://" + req.get('host') + "/powiatwulkanowy";
res.json({
status: "sucess",

13
src/views/messages.pug Normal file
View file

@ -0,0 +1,13 @@
doctype html
html
head
meta(charset="utf-8")
title Użytkownik
script
| var VParam = {
| version: '19.02.0001.32324',
| antiForgeryToken: 'lX9xvk-OBA0VmHrNIFcQp2xVBZhza9tJ1QbYVKXGM3lFUr0a-OTDo5xUSQ70ROYKf6ICZ1LSXCfDAURoCmDZ-OEedW8IKtyF1s63HyWKxbmHaP-vsVCsGlN6zRHwx1r4h',
| appGuid: '877c4a726ad61667f4e2237f0cf6307a'
| }
body
a(href="-endpoints") Endpointy