当前位置:网站首页>How does easygbs, a national standard platform, solve the problem that information cannot be carried across domains?
How does easygbs, a national standard platform, solve the problem that information cannot be carried across domains?
2022-06-24 12:16:00 【Tsingsee green rhino video】
EasyGBS、EasyNVR、EasyCVR And other live video platforms have very rich secondary development interfaces , Users can freely call for secondary development . Some users call EasyGBS During the secondary development of the interface , Due to the cross domain problem, the user information is cookie I can't carry it with me , Therefore, the correct user information cannot be obtained , This will affect the calling of the interface .
For the problem of this interface call , It needs to be optimized . The information carrying problem is caused by cross domain , We're going to start with URL Found later token, And then through token Carry information . Add the following code :
return func(c *gin.Context) {
session := sessions.Default(c)
uname := session.Get("uname")
uid := session.Get("uid")
//log.Printf("SetUsername() --> uname = %v uid = %v", uname, uid)
if uname == nil || uid == nil {
// from URL Found later token
token := c.Query("token")
if token != "" {
uname = sessions.GetNameByToken(db.SQLite /*models.DB*/, store, token)
uid = sessions.GetIdByToken(db.SQLite /*models.DB*/, store, token)
}
}
Then test again , Interface call display is normal .
EasyGBS Support the video stream transmission of national standard protocol , After years of development and optimization , It has become a stable and reliable video streaming media platform , It has played a role in many industries , For example, the common culture, education and health 、 The Internet of things 、 Smart city, etc ,EasyGBS Its high openness also determines that it can seamlessly connect with the additional functions of any industry , If you're interested , Welcome to download the test directly , The test version can also call the interface for secondary development .
边栏推荐
- 怎么可以打新债 开户是安全的吗
- Popular science of data annotation: ten common image annotation methods
- 【数字IC/FPGA】Booth乘法器
- The idea of "6 points + gene family" without experiment~
- Google ranging for PHP wechat development
- Ten thousand campus developers play AI in a fancy way. It's enough to see this picture!
- 可变参数模板实现max(接受多个参数,两种实现方式)
- Deep parsing and implementation of redis pub/sub publish subscribe mode message queue
- How to purchase new bonds is it safe to open an account
- Database migration tool flyway vs liquibase (II)
猜你喜欢

Basic path test of software test on the function of the previous day

【直播回顾】战码先锋第七期:三方应用开发者如何为开源做贡献
Database migration tool flyway vs liquibase (II)

《opencv学习笔记》-- 离散傅里叶变换

如何优雅的写 Controller 层代码?

Qt: judge whether the string is in numeric format

计组-总复习

工具及方法 - 在Source Insight中使用代码格式化工具

链接器 --- Linker

How is the e-commerce red envelope realized? For interview (typical high concurrency)
随机推荐
Opencv learning notes -- Separation of color channels and multi-channel mixing
GLOG从入门到入门
Database migration tool flyway vs liquibase (II)
Influence of DEX optimization on arouter lookup path
《opencv学习笔记》-- 感兴趣区域(ROI)、图像混合
《opencv学习笔记》-- 离散傅里叶变换
Programmers spend most of their time not writing code, but...
C语言循环语句介绍(foe、while、do...while)
【直播回顾】战码先锋第七期:三方应用开发者如何为开源做贡献
夜晚读书 -- 关于微服务和容器
如何开发短信通知和语音功能医院信息系统(HIS系统)
Google Earth engine (GEE) - how to add a legend in the map panel
美团基于 Flink 的实时数仓平台建设新进展
Shell脚本(.sh文件)如何执行完毕之后不自动关闭、闪退?
2022年有什么低门槛的理财产品?钱不多
炒伦敦金短线稳定赚钱技巧?在哪里炒伦敦金安全靠谱?
Libuv的安装及运行使用
9+!通过深度学习从结直肠癌的组织学中预测淋巴结状态
5W1H talk about open source - what is open source?
Ingenious conception - iron death regulatory factor classification and prognosis 6+