当前位置:网站首页>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 .
边栏推荐
- Coinbase will launch the first encrypted derivative product for retail traders
- [206] use PHP language to generate the code of go language
- Chenglixin research group of Shenzhen People's hospital proposed a new method of multi group data in the diagnosis and prognosis analysis of hepatocellular carcinoma megps
- What code did the full stack programmer write this month?
- C语言循环语句介绍(foe、while、do...while)
- Opencv learning notes - loading and saving images
- 《opencv学习笔记》-- 感兴趣区域(ROI)、图像混合
- 深圳市人民医院程立新课题组提出多组学数据在肝细胞癌的诊断与预后分析的新方法meGPS
- AXI低功耗接口
- How to open a new bond? Is it safe to open an account
猜你喜欢
我真傻,招了一堆只会“谷歌”的程序员!
《opencv学习笔记》-- 图像的载入和保存
Group planning - General Review
Linker --- linker
ArrayList # sublist these four holes, you get caught accidentally
GTest从入门到入门
软件测试 对前一日函数的基本路径测试
Libuv的安装及运行使用
How to develop hospital information system (his) with SMS notification and voice function
《梦华录》要大结局了,看超前点映不如先来学学它!
随机推荐
Opencv learning notes - Discrete Fourier transform
11+文章-机器学习打造ProTICS框架-深度揭示了不同分子亚型中肿瘤浸润免疫细胞对预后的影响
Database migration tool flyway vs liquibase (II)
【数字IC/FPGA】Booth乘法器
Is it safe to open an account under the conditions of new bonds
怎么可以打新债 开户是安全的吗
11+的基于甲基化组和转录组综合分析识别葡萄膜黑色素瘤中新的预后 DNA 甲基化特征~
工具及方法 - 在Source Insight中使用代码格式化工具
单基因泛癌+简单实验就能发表7分+
《opencv学习笔记》-- 离散傅里叶变换
Turn 2D photos into 3D models to see NVIDIA's new AI "magic"!
5W1H talk about open source - what is open source?
5分+的单基因泛癌纯生信思路!
LS-DYNA新手入门经验
Which commercial insurance endowment insurance is good? Ranking of commercial endowment insurance products in 2022
QT -- the qtabwidget supports dragging tabbar items
Embedded must learn! Detailed explanation of hardware resource interface - based on arm am335x development board (Part 1)
A fault record of misoperation dhclient script
Basic path test of software test on the function of the previous day
Istio best practice: graceful termination