<commit_before><?php

use Symfony\Component\HttpFoundation\Request;

/**
 * @var \Symfony\Component\ClassLoader\ClassLoader
 */
$loader = require __DIR__.'/../app/autoload.php';
include_once __DIR__.'/../app/bootstrap.php.cache';

$kernel = new AppKernel('prod', false);
$kernel->loadClassCache();

if ($_SERVER['REMOTE_ADDR'] === '192.168.127.12') {
    Request::setTrustedProxies([$_SERVER['REMOTE_ADDR']]);
    // force all trusted header names
    Request::setTrustedHeaderName(Request::HEADER_FORWARDED, '');
    Request::setTrustedHeaderName(Request::HEADER_CLIENT_IP, 'X_REAL_IP');
    Request::setTrustedHeaderName(Request::HEADER_CLIENT_HOST, '');
    Request::setTrustedHeaderName(Request::HEADER_CLIENT_PROTO, '');
    Request::setTrustedHeaderName(Request::HEADER_CLIENT_PORT, '');
}

$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);<commit_msg>Use simplified trusted proxy setup for JFM #OP-6<commit_after><?php

use Symfony\Component\HttpFoundation\Request;

/**
 * @var \Symfony\Component\ClassLoader\ClassLoader
 */
$loader = require __DIR__.'/../app/autoload.php';
include_once __DIR__.'/../app/bootstrap.php.cache';

$kernel = new AppKernel('prod', false);
$kernel->loadClassCache();

Request::setTrustedProxies(['10.254.0.73','10.254.0.74']);

$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
{'fraction_non_alphanumeric': 0.1855324849296718, 'fraction_numerical': 0.018754186202277295, 'mean_word_length': 6.545454545454546, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 3, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7502972', 'n_tokens_mistral': 502, 'n_tokens_neox': 487, 'n_words': 66}