Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

前后端分离框架下csrfToken如何下发?

后端使用了egg框架,可以拿到csrfToken并无感知验证。

问题是前端如何获取这个token

但是项目前后端分离,无法使用ssr把token喷到页面中。

如果再写一个接口去获取token就会把token暴露出来,不安全

如何解?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

login获取token


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...