新增允许所有跨域请求配置项 (#2449)

配置项为http.allow_cross_domains
This commit is contained in:
老衲不出家
2023-05-12 11:47:22 +08:00
committed by GitHub
parent 1136b0a3c0
commit f6ac39ade5
4 changed files with 13 additions and 2 deletions

View File

@@ -159,6 +159,7 @@ const string kNotFound = HTTP_FIELD "notFound";
const string kDirMenu = HTTP_FIELD "dirMenu";
const string kForbidCacheSuffix = HTTP_FIELD "forbidCacheSuffix";
const string kForwardedIpHeader = HTTP_FIELD "forwarded_ip_header";
const string kAllowCrossDomains = HTTP_FIELD "allow_cross_domains";
static onceToken token([]() {
mINI::Instance()[kSendBufSize] = 64 * 1024;
@@ -186,6 +187,7 @@ static onceToken token([]() {
<< endl;
mINI::Instance()[kForbidCacheSuffix] = "";
mINI::Instance()[kForwardedIpHeader] = "";
mINI::Instance()[kAllowCrossDomains] = 1;
});
} // namespace Http