only do resume encryption shit in dev env. also resume font
This commit is contained in:
parent
7d578987f7
commit
1dc62ce4d7
4 changed files with 30 additions and 12 deletions
BIN
assets/fonts/RHD/RedHatDisplay.ttf
Normal file
BIN
assets/fonts/RHD/RedHatDisplay.ttf
Normal file
Binary file not shown.
BIN
assets/fonts/RHT/RedHatText.ttf
Normal file
BIN
assets/fonts/RHT/RedHatText.ttf
Normal file
Binary file not shown.
|
@ -7,9 +7,25 @@ footer,
|
|||
@font-face {
|
||||
font-family: "Lexend";
|
||||
font-weight: regular;
|
||||
src: url("./Lexend/Lexend.ttf");
|
||||
src: url("/assets/fonts/Lexend/Lexend.ttf");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "RedHatDisplay";
|
||||
font-weight: regular;
|
||||
src: url("/assets/fonts/RHD/RedHatDisplay.ttf");
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "RedHatText";
|
||||
font-weight: regular;
|
||||
src: url("/assets/fonts/RHT/RedHatText.ttf");
|
||||
}
|
||||
|
||||
html {
|
||||
font-family: "Lexend";
|
||||
font-family: "RedHatText";
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-family: "RedHatDisplay";
|
||||
}
|
22
index.js
22
index.js
|
@ -488,19 +488,21 @@ app.get('/updates', async (req, res) => {
|
|||
});
|
||||
});
|
||||
|
||||
// const enc_key = Buffer.from(process.env.RESUME_ENCRYPTION_KEY, "hex");
|
||||
if (process.env.NODE_ENV === "development") {
|
||||
const enc_key = Buffer.from(process.env.RESUME_ENCRYPTION_KEY, "hex");
|
||||
|
||||
// app.get('/resumeEnc', async (req, res) => {
|
||||
// const iv = crypto.randomBytes(16);
|
||||
// const cipher = crypto.createCipheriv(
|
||||
// "aes-256-cbc", enc_key, iv
|
||||
// );
|
||||
app.get('/resumeEnc', async (req, res) => {
|
||||
const iv = crypto.randomBytes(16);
|
||||
const cipher = crypto.createCipheriv(
|
||||
"aes-256-cbc", enc_key, iv
|
||||
);
|
||||
|
||||
// let encrypted = cipher.update(req.query.text, 'utf8', 'hex');
|
||||
// encrypted += cipher.final('hex');
|
||||
let encrypted = cipher.update(req.query.text, 'utf8', 'hex');
|
||||
encrypted += cipher.final('hex');
|
||||
|
||||
// res.send(encrypted + "\n" + iv.toString('hex'));
|
||||
// });
|
||||
res.header("Content-type", "text/plain").send(encrypted + "\n" + iv.toString('hex'));
|
||||
});
|
||||
}
|
||||
|
||||
function decipher(file, key) {
|
||||
let hexKey;
|
||||
|
|
Loading…
Reference in a new issue