mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-07-24 07:21:09 -04:00
Merge branch 'master' into public-dashboard
# Conflicts: # server/database.js # server/server.js # server/util-server.js
This commit is contained in:
commit
f47f7758f9
33 changed files with 1596 additions and 110 deletions
|
@ -273,6 +273,16 @@ exports.getTotalClientInRoom = (io, roomName) => {
|
|||
}
|
||||
}
|
||||
|
||||
exports.genSecret = () => {
|
||||
let secret = "";
|
||||
let chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
||||
let charsLength = chars.length;
|
||||
for ( let i = 0; i < 64; i++ ) {
|
||||
secret += chars.charAt(Math.floor(Math.random() * charsLength));
|
||||
}
|
||||
return secret;
|
||||
}
|
||||
|
||||
exports.allowDevAllOrigin = (res) => {
|
||||
if (process.env.NODE_ENV === "development") {
|
||||
exports.allowAllOrigin(res);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue