feat: 视频预览/数据看板/下载配置 三项业务功能
- 新增视频预览:VideoPlayer 组件、VideoController/DyCollectVideoService/Repository、VideoPageRequestDTO 对应后端改动 - 新增数据看板:workplace/statics.vue、RecordTable、相关 store/http/axios 改动 - 新增下载配置:DownloadConfigService、ConfigController、AppSet.vue、AppConfig - 其他:DyHttpClientService / 同步 Job(Collect, Favorit) / Cookie 表 / CommonService / ServiceExtension 的配套调整 - 仓库卫生:.gitignore 追加 feiniu 过滤;运维脚本归档到 docs/scripts/
This commit is contained in:
@@ -95,8 +95,22 @@ namespace dy.net.extension
|
||||
{
|
||||
OnMessageReceived = context =>
|
||||
{
|
||||
context.Token = context.Request.Headers["Authorization"]
|
||||
// 优先从 Header 读取
|
||||
var token = context.Request.Headers["Authorization"]
|
||||
.FirstOrDefault()?.Split(" ").Last();
|
||||
|
||||
// 如果 Header 中没有,尝试从 Cookie 读取
|
||||
if (string.IsNullOrEmpty(token))
|
||||
{
|
||||
token = context.Request.Cookies["Authorization"];
|
||||
// Cookie 中可能包含 "Bearer " 前缀,需要移除
|
||||
if (!string.IsNullOrEmpty(token) && token.StartsWith("Bearer "))
|
||||
{
|
||||
token = token.Substring(7);
|
||||
}
|
||||
}
|
||||
|
||||
context.Token = token;
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user