当前位置:网站首页>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 .
边栏推荐
- Deep parsing and implementation of redis pub/sub publish subscribe mode message queue
- Which commercial insurance endowment insurance is good? Ranking of commercial endowment insurance products in 2022
- 数据标注科普:十种常见的图像标注方法
- 为什么虚拟机ping的通主机,主机ping不通虚拟机
- [deep learning][pytorch][original]crnn trains loss on the higher version of pytorch as a solution for Nan
- 【直播回顾】战码先锋第七期:三方应用开发者如何为开源做贡献
- LS-DYNA beginner's experience
- Opencv learning notes - loading and saving images
- GLOG from getting started to getting started
- The latest hot spot: the use of copper death related genes for tumor prognosis typing!
猜你喜欢

GLOG from getting started to getting started

Ten thousand campus developers play AI in a fancy way. It's enough to see this picture!

Tools and methods - use code formatting tools in source insight

美团基于 Flink 的实时数仓平台建设新进展

ArrayList # sublist these four holes, you get caught accidentally

How to write controller layer code gracefully?

GTEST from getting started to getting started
【老卫搞机】090期:键盘?主机?全功能键盘主机!

PHP SMS notification + voice broadcast automatic double call

Basic path test of software test on the function of the previous day
随机推荐
Deep parsing and implementation of redis pub/sub publish subscribe mode message queue
How to open a new bond? Is it safe to open an account
Example of PHP observer mode [useful in the laravel framework]
How to apply for new bonds is it safe to open an account
炒伦敦金短线稳定赚钱技巧?在哪里炒伦敦金安全靠谱?
Opencv learning notes - regions of interest (ROI) and image blending
Fizz gateway secondary development integration tutorial
11+! 结肠癌中基于 m6A 调节因子的甲基化修饰模式以不同的肿瘤微环境免疫谱为特征
Deep learning ~11+ a new perspective on disease-related miRNA research
How to develop hospital information system (his) with SMS notification and voice function
【Go语言刷题篇】Go从0到入门4:切片的高级用法、初级复习与Map入门学习
FreeRTOS概述与体验
Linker --- linker
深圳市人民医院程立新课题组提出多组学数据在肝细胞癌的诊断与预后分析的新方法meGPS
Libuv的安装及运行使用
Audio knowledge (III) -- MFCCs code implementation
2D 照片变身 3D 模型,来看英伟达的 AI 新“魔法”!
Jenkins performance test
美团基于 Flink 的实时数仓平台建设新进展
5 points + single gene pan cancer pure Shengxin idea!