We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3dedcb5 commit 4e64b47Copy full SHA for 4e64b47
1 file changed
src/server.rs
@@ -28,7 +28,7 @@ use std::{
28
use time::OffsetDateTime;
29
use tokio::net::TcpListener;
30
31
-use crate::{config, dbg_msg};
+use crate::dbg_msg;
32
33
/// The unified body type used for all responses.
34
pub type Body = BoxBody<Bytes, Infallible>;
@@ -373,10 +373,7 @@ impl Server {
373
let def_headers = (*default_headers).clone();
374
375
// Catch robots.txt-disrespectful bots who still identify themselves
376
- if match config::get_setting("REDLIB_ROBOTS_DISABLE_INDEXING") {
377
- Some(val) => val == "on",
378
- None => false,
379
- } {
+ if crate::utils::disable_indexing() {
380
if let Some(user_agent) = req_headers.get("user-agent") {
381
if let Ok(user_agent_str) = user_agent.to_str() {
382
for banned in BANNED_USER_AGENTS {
0 commit comments