<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
# -*- coding: utf-8 -*-
#
# Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2024 All Rights Reserved
#
# Licensed under CLOUD LINUX LICENSE AGREEMENT
# http://cloudlinux.com/docs/LICENSE.TXT

from pathlib import Path

# Collector version
# once version is increased - collector invalidates cache
# see sending_stats dict in website_collector.py
MAJOR_VER = 2
VERSION = f"{MAJOR_VER}.0.0"
# Storage dir
STORAGE_DIR = Path("/var/lve/website_collector")

# Opt-out control
OPT_OUT_FILE = STORAGE_DIR / ".disabled"

# Processing limits
DOCROOT_SCAN_TIMEOUT = 30  # Timeout per docroot scan in seconds
DOCROOT_LIMIT_PER_RUN = 500  # Maximum number of docroots to process in single run
DOCROOT_MAX_DEPTH = 30  # Maximum depth of docroot scanning
DOCROOT_EXCLUDE_DIRS = [
    'node_modules', 'vendor',
    '.idea', '.vscode', '.well-known',
    '.git', '.svn', '.hg']  # Directories to exclude from docroot scanning

SENDING_TIMEOUT = 7200  # Total timeout 2 hours
SENDING_COMPRESSION = True  # Compress data before sending
# MAX_RECORD_SIZE: JSON-payload batch limit before HTTP split; ~10 files
# per request keeps batching while bounding payload size.
MAX_RECORD_SIZE = 1024 * 1024 * 10  # 10MB
# FILE_SIZE_LIMIT: per-file read cap; blocks tenant-user DoS via an
# oversized .htaccess (CLOS-4275 #17).
FILE_SIZE_LIMIT = 1024 * 1024  # 1MB
