当前位置:网站首页>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 learning][pytorch][original]crnn trains loss on the higher version of pytorch as a solution for Nan
- ahk实现闹钟
- The idea of "6 points + gene family" without experiment~
- Identification of new prognostic DNA methylation features in uveal melanoma by 11+ based on methylation group and transcriptome analysis~
- 嵌入式必学!硬件资源接口详解——基于ARM AM335X开发板 (下)
- Cloud native database: the outlet of the database, you can also take off
- Reading at night -- about microservices and containers
- 10 zeros of D
- TP-LINK 1208 router tutorial (2)
猜你喜欢

Libuv的安装及运行使用

我真傻,招了一堆只会“谷歌”的程序员!

Opencv learning notes - regions of interest (ROI) and image blending
![[digital ic/fpga] booth multiplier](/img/42/3da3b1d3cc82cb9c0694241148011b.png)
[digital ic/fpga] booth multiplier

QT -- the qtabwidget supports dragging tabbar items

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

Turn 2D photos into 3D models to see NVIDIA's new AI "magic"!

Qt: judge whether the string is in numeric format

GLOG从入门到入门

【直播回顾】战码先锋第七期:三方应用开发者如何为开源做贡献
随机推荐
Database migration tool flyway vs liquibase (II)
保险APP适老化服务评测分析2022第06期
打新债的条件 开户是安全的吗
[deep learning][pytorch][original]crnn trains loss on the higher version of pytorch as a solution for Nan
Ingenious conception - iron death regulatory factor classification and prognosis 6+
How to purchase new bonds is it safe to open an account
11+! 结肠癌中基于 m6A 调节因子的甲基化修饰模式以不同的肿瘤微环境免疫谱为特征
【206】使用php语言去生成go语言的代码
Shell脚本(.sh文件)如何执行完毕之后不自动关闭、闪退?
Programmers spend most of their time not writing code, but...
5 points + single gene pan cancer pure Shengxin idea!
集群控制管理
Oxylabs live online: website capture demo
The latest hot spot: the use of copper death related genes for tumor prognosis typing!
Using the collaboration database query of Poole in laravel5.6
Group planning - General Review
为什么虚拟机ping的通主机,主机ping不通虚拟机
Opencv learning notes - loading and saving images
《opencv学习笔记》-- 分离颜色通道、多通道混合
Opencv learning notes -- Separation of color channels and multi-channel mixing