Skip to content
This repository was archived by the owner on Aug 2, 2020. It is now read-only.

Commit 2f7388b

Browse files
committed
Allow uppercase "HTTP://"
1 parent 1a8bad6 commit 2f7388b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cqhttp/plugins/web/http.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ namespace cqhttp::plugins {
158158

159159
void Http::hook_enable(Context &ctx) {
160160
post_url_ = ctx.config->get_string("post_url", "");
161-
if (!post_url_.empty() && !regex_search(post_url_, regex("^https?://"))) {
161+
if (!post_url_.empty() && !regex_search(post_url_, regex("^https?://", regex::icase))) {
162162
// bad post url, we warn the user, and ignore the post url
163163
logging::warning(TAG, u8"HTTP 上报地址 " + post_url_ + u8" 不是合法地址,将被忽略");
164164
post_url_ = "";

0 commit comments

Comments
 (0)