You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+for _, notSkipPath := range notSkipJWTPaths {+ if strings.HasSuffix(uri, notSkipPath) || strings.HasPrefix(uri, notSkipPath) {+ return false+ }+}
for _, skipPath := range skipJWTPaths {
if strings.HasSuffix(uri, skipPath) || strings.HasPrefix(uri, skipPath) {
return true
}
}
-for _, notSkipPath := range notSkipJWTPaths {- if strings.HasSuffix(uri, notSkipPath) || strings.HasPrefix(uri, notSkipPath) {- return false- }-}
Suggestion importance[1-10]: 7
__
Why: The suggestion reorders the JWT path checks to prioritize notSkipJWTPaths over skipJWTPaths, which can resolve potential conflicting rules. The improvement is contextually sound but only offers a moderate impact.
Why: The suggestion accurately identifies the inconsistency between SQLQueryRootURI and OdcQueryRootURI by recommending an appended slash for uniform format. This is a minor yet useful improvement, warranting a moderate score.
Why: This suggestion correctly identifies that the middleware currently only calls next(c) and advises adding a TODO for future log implementation, thereby improving code clarity.
var notSkipJWTPaths = []string{
- sqlWorkbenchService.SQL_WORKBENCH_URL,+ sqlWorkbenchService.SQL_WORKBENCH_URL, // 确保此URL配置正确且特定于需要严格验证的路径
}
Suggestion importance[1-10]: 4
__
Why: The suggestion only adds a comment to the notSkipJWTPaths declaration without changing its logic. It serves as a reminder to check URL matching but doesn't alter functionality.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
关联的 issue
https://github.com/actiontech/sqle-ee/issues/2583
描述你的变更
确认项(pr提交后操作)
Tip
请在指定复审人之前,确认并完成以下事项,完成后✅
not_compatibleneed_update_docDescription
新增支持 ODC 查询配置
添加操作日志记录中间件
重构 Gzip 处理逻辑到工具库
更新 Swagger 接口文档
Diagram Walkthrough
File Walkthrough
6 files
新增 ODC 查询配置字段配置中间件、Gzip 重构及 JWT 跳过调整更新 SQL 查询配置返回结构新增 Gzip 工具函数新增操作日志中间件配置结构体新增操作日志中间件实现(社区版)2 files
移除重复的 Cloudbeaver 配置函数移除重复的 SQL Workbench 配置函数2 files
更新 Swagger JSON 定义,新增 ODC 字段更新 Swagger YAML 定义,新增 ODC 字段