Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
sdankel committed May 2, 2024
1 parent d13dc3e commit dc7d19d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fn get_allowed_origin(headers: &HeaderMap<'_>) -> Option<String> {

if let Some(req_origin) = headers.get_one("Origin") {
// If the environment variable CORS_HTTP_ORIGIN is set, only allow that origin.
if let Some(env_origin) = env::var("CORS_HTTP_ORIGIN").ok() {
if let Ok(env_origin) = env::var("CORS_HTTP_ORIGIN") {
if req_origin == env_origin.as_str() {
return Some(env_origin);
}
Expand Down

0 comments on commit dc7d19d

Please sign in to comment.