Skip to content

feat: add custom User-Agent configuration support for S3 clients#215

Merged
f2c-ci-robot[bot] merged 3 commits into
halo-dev:mainfrom
XiSoul:feature/custom-user-agent
May 11, 2026
Merged

feat: add custom User-Agent configuration support for S3 clients#215
f2c-ci-robot[bot] merged 3 commits into
halo-dev:mainfrom
XiSoul:feature/custom-user-agent

Conversation

@XiSoul
Copy link
Copy Markdown
Contributor

@XiSoul XiSoul commented May 10, 2026

新增可选自定义User-Agent配置项,默认留空,不影响任何原有功能

  • 新增userAgent字段到S3OsProperties,默认空字符串
  • 配置表单新增自定义UA输入框,附带中国科技云适配提示
  • S3Client构建逻辑添加UA头注入,仅当配置非空时生效
  • README文档更新:新增UA配置说明、中国科技云兼容性条目
  • 完全向后兼容,默认行为和原版完全一致

Fixes #209

支持自定义 User Agent,解决部分厂商的兼容性问题

新增可选自定义User-Agent配置项,默认留空,不影响任何原有功能
- 新增userAgent字段到S3OsProperties,默认空字符串
- 配置表单新增自定义UA输入框,附带中国科技云适配提示
- S3Client构建逻辑添加UA头注入,仅当配置非空时生效
- README文档更新:新增UA配置说明、中国科技云兼容性条目
- 完全向后兼容,默认行为和原版完全一致
@f2c-ci-robot f2c-ci-robot Bot added the do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. label May 10, 2026
@XiSoul
Copy link
Copy Markdown
Contributor Author

XiSoul commented May 10, 2026

新增自定义User-Agent配置支持,兼容中国科技云数据胶囊等需要UA校验的S3服务

Copy link
Copy Markdown
Member

@ruibaby ruibaby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感谢参与贡献,以下是改动建议。

Comment thread src/main/resources/extensions/policy-template-s3os.yaml Outdated
Comment thread src/main/resources/extensions/policy-template-s3os.yaml Outdated
Comment thread src/main/resources/extensions/policy-template-s3os.yaml
Comment thread src/main/resources/extensions/policy-template-s3os.yaml
Comment thread src/main/resources/extensions/policy-template-s3os.yaml
Comment thread src/main/resources/extensions/policy-template-s3os.yaml
Comment thread src/main/resources/extensions/policy-template-s3os.yaml Outdated
Comment thread src/main/resources/extensions/policy-template-s3os.yaml Outdated
Comment thread src/main/resources/extensions/policy-template-s3os.yaml Outdated
Add an optional 'User-Agent' configuration field that allows users to
specify a custom User-Agent header for S3 requests. This is needed for
S3-compatible services like CSTCloud Data Capsule that validate client
application binding on access keys.

Changes:
- Add 'userAgent' field to S3OsProperties (default: empty, no behavior change)
- Inject custom User-Agent header in S3Client when configured
- Add User-Agent input to the admin configuration form
- Add CSTCloud Data Capsule to compatibility table
- Add User-Agent configuration documentation to README
@XiSoul XiSoul closed this May 11, 2026
@XiSoul XiSoul deleted the feature/custom-user-agent branch May 11, 2026 01:50
@XiSoul XiSoul reopened this May 11, 2026
@XiSoul
Copy link
Copy Markdown
Contributor Author

XiSoul commented May 11, 2026

支持自定义 User-Agent 请求头,解决中国科技云(CSTCloud)等 S3 兼容服务的应用绑定验证问题。

Comment thread src/main/resources/extensions/policy-template-s3os.yaml Outdated
@f2c-ci-robot f2c-ci-robot Bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels May 11, 2026
Copy link
Copy Markdown
Member

@ruibaby ruibaby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@f2c-ci-robot f2c-ci-robot Bot added the lgtm Indicates that a PR is ready to be merged. label May 11, 2026
@f2c-ci-robot
Copy link
Copy Markdown

f2c-ci-robot Bot commented May 11, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ruibaby

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@f2c-ci-robot f2c-ci-robot Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 11, 2026
@f2c-ci-robot f2c-ci-robot Bot merged commit 86c4153 into halo-dev:main May 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

连接中国科技云数据胶囊时状态码500错误

2 participants