node生成token报错:secretOrPrivateKey has a minimum key size of 2048 bits for RS256 at Object.module.exports [as sign]
摘要:提要:在node生成token时 利用用jsonwebtoken,利用非对称加密的生成token const jwt = require("jsonwebtoken"); const privateKey = fs.readFileSync("./keys/private.key"); const
阅读全文
原生AJAX的学习
摘要:基础知识 知识点梳理见图: 自己动手实践案例 案例1: 访问本地文件 <!DOCTYPE html> <html> <body> <div id="demo"> <h1>XMLHttpRequest 对象</h1> <button type="button" onclick="loadDoc()">
阅读全文
原生AJAX案例浏览器报错:Cross origin requests are only supported for protocol
摘要:报错信息如下: 代码如下: <!DOCTYPE html> <html> <body> <div id="demo"> <h1>XMLHttpRequest 对象</h1> <button type="button" onclick="loadDoc()">更改内容</button> </div>
阅读全文