Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(notify): support qywx api proxy #2802

Merged
merged 1 commit into from
Nov 15, 2024
Merged

Conversation

cheekyshibe
Copy link
Contributor

@cheekyshibe cheekyshibe commented Nov 14, 2024

如果使用 Vercel 作为服务端,企业微信应用的可信 IP 就难以稳定设置(自部署在公网服务器的则不会碰到这种情况),因此目前常见的策略是使用一台公网 IP 服务器作为企业微信 API 的反向代理,并需要将此代理服务器添加到可信 IP.

Refs: #2753 #2661

以下是新引入的两个环境变量的简明文档:

[QYWX_PROXY]
用途: 指定企业微信接口的反向代理服务器地址(可信IP),未配置则不使用代理。
示例: 123.213.132.231
说明: 当设置此变量时,所有对企业微信 API 的请求将通过该代理服务器进行转发。

[QYWX_PROXY_PORT]
用途: 指定企业微信接口的反向代理服务器端口(默认 80)
示例: 8080
说明: 如果 [QYWX_PROXY] 设置了但未指定端口号,则使用此变量指定的端口号。如果未设置此变量,则默认使用 80 端口。


If Vercel is used as the server, the trusted IP of the enterprise WeChat application will be difficult to stably set (this situation will not happen if it is self-deployed on a public network server). Therefore, the current common strategy is to use a public network IP server as Reverse proxy for Enterprise WeChat API and need to add this proxy server to the trusted IP.

Refs: #2753 #2661

The following is concise documentation of the two newly introduced environment variables:

[QYWX_PROXY]
Purpose: Specify the reverse proxy server address (trusted IP) of the enterprise WeChat interface. If not configured, the proxy will not be used.
Example: 123.213.132.231
Description: When this variable is set, all requests to the Enterprise WeChat API will be forwarded through this proxy server.

[QYWX_PROXY_PORT]
Purpose: Specify the reverse proxy server port of the enterprise WeChat interface (default 80)
Example: 8080
Description: If [QYWX_PROXY] is set but no port number is specified, the port number specified by this variable is used. If this variable is not set, port 80 is used by default.

@cheekyshibe cheekyshibe changed the title feat(notify): support qywx forwarding proxy feat(notify): support qywx api proxy Nov 14, 2024
@lizheming lizheming merged commit 845969e into walinejs:main Nov 15, 2024
9 checks passed
cheekyshibe added a commit to cheekyshibe/waline-fork that referenced this pull request Nov 15, 2024
lizheming pushed a commit that referenced this pull request Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants