Skip to content

feat(123): allow modification of the platform header#1542

Merged
jyxjjj merged 3 commits intoOpenListTeam:mainfrom
moyanj:main
Nov 3, 2025
Merged

feat(123): allow modification of the platform header#1542
jyxjjj merged 3 commits intoOpenListTeam:mainfrom
moyanj:main

Conversation

@moyanj
Copy link
Contributor

@moyanj moyanj commented Oct 26, 2025

Description / 描述

允许修改platform请求头以支持部分特殊场景

Motivation and Context / 背景

How Has This Been Tested? / 测试

已在本地手动测试

Checklist / 检查清单

  • I have read the CONTRIBUTING document.
    我已阅读 CONTRIBUTING 文档。
  • I have formatted my code with go fmt or prettier.
    我已使用 go fmtprettier 格式化提交的代码。
  • I have added appropriate labels to this PR (or mentioned needed labels in the description if lacking permissions).
    我已为此 PR 添加了适当的标签(如无权限或需要的标签不存在,请在描述中说明,管理员将后续处理)。
  • I have requested review from relevant code authors using the "Request review" feature when applicable.
    我已在适当情况下使用"Request review"功能请求相关代码作者进行审查。
  • I have updated the repository accordingly (If it’s needed).
    我已相应更新了相关仓库(若适用)。

@KirCute KirCute changed the title feat(drivers/123): Allow modification of the platform field feat(123): allow modification of the platform header Oct 26, 2025
@xrgzs xrgzs added enhancement go Module: Driver Driver-Related Issue/PR labels Oct 26, 2025
ILoveScratch2
ILoveScratch2 previously approved these changes Oct 26, 2025
@ILoveScratch2 ILoveScratch2 requested a review from Copilot October 26, 2025 12:59
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for customizing the platform HTTP header in the 123 driver to accommodate special use cases. The change introduces a new configurable field that allows users to specify different platform values instead of the hardcoded "web" value.

Key changes:

  • Added a new Platform configuration field to the driver's metadata with a default value of "web"
  • Updated the header setting to use the configurable platform value instead of the hardcoded string
  • Modified the Init method to explicitly set the platform header to "web" during initialization

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
drivers/123/meta.go Adds the new Platform configuration field to the Addition struct
drivers/123/util.go Updates the platform header to use the configurable d.Platform value
drivers/123/driver.go Modifies Init to explicitly set platform header to "web" for initialization requests

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jyxjjj jyxjjj merged commit db8a7e8 into OpenListTeam:main Nov 3, 2025
12 checks passed
@xrgzs xrgzs mentioned this pull request Nov 8, 2025
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement go Module: Driver Driver-Related Issue/PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants