mirror of
https://github.com/typesense/typesense.git
synced 2025-05-22 06:40:30 +08:00
Fix CORS value case sensitivity.
This commit is contained in:
parent
8aa2c5e073
commit
8835533193
@ -292,7 +292,6 @@ public:
|
||||
this->ssl_certificate_key = get_env("TYPESENSE_SSL_CERTIFICATE_KEY");
|
||||
|
||||
std::string cors_value = get_env("TYPESENSE_ENABLE_CORS");
|
||||
StringUtils::tolowercase(cors_value);
|
||||
set_cors_parameters(cors_value);
|
||||
|
||||
if(!get_env("TYPESENSE_MAX_MEMORY_RATIO").empty()) {
|
||||
@ -559,7 +558,8 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void set_cors_parameters(const std::string& cors_value) {
|
||||
void set_cors_parameters(std::string& cors_value) {
|
||||
StringUtils::tolowercase(cors_value);
|
||||
this->enable_cors = !(cors_value == "false");
|
||||
|
||||
if(cors_value != "true" && cors_value != "false") {
|
||||
|
Loading…
x
Reference in New Issue
Block a user