Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

134
Visualizações
js.map files being unnecessarily tracked by php logging script - huh?

I have a weird problem with my .js.map files being unintentionally logged.

In php files I include a header.php file for, well, my header. In my header I include logUserData.php - in which I get the user ip, account info, and log stuff in the database. Basic intention is to track where our users go (not in Analytics, just for our data uses).

Everything works fine, all traffic is logged - but, the .js.map files are tracked. You probably know these aren't listed anywhere in my source. I don't include my logging script in these files, which would be weird anyway.

I have zero purpose to track these files. I don't ever really care if they're called... I can filter them out with the script but that avoids the problem and doesn't fix it.

I have tried moving the include from the header to the footer basically as a shot in the dark. Totally at a loss. I have put the call before and after these scripts, before the html and after.

These are the scripts that have their associated maps called:

<script src="/js/toastr.min.js"></script>
<script src="/js/popper.min.js"></script>
<script src="/js/socket.io.js"></script>

And here are the only relevant parts of the logging script in case it helps, the rest is just user account and db stuff:

$browser = $_SERVER['HTTP_USER_AGENT'];
$ip = $_SERVER['REMOTE_ADDR'];
$CurUrl = $_SERVER['REQUEST_URI'];
$refer = $_SERVER['HTTP_REFERER'];

function get_client_ip() {
    $ipaddress = '';
    if (isset($_SERVER['HTTP_CLIENT_IP']))
        $ipaddress = $_SERVER['HTTP_CLIENT_IP'];
    else if (isset($_SERVER['HTTP_X_FORWARDED_FOR']))
        $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];
    else if (isset($_SERVER['HTTP_X_FORWARDED']))
        $ipaddress = $_SERVER['HTTP_X_FORWARDED'];
    else if (isset($_SERVER['HTTP_F ORWARDED_FOR']))
        $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];
    else if (isset($_SERVER['HTTP_FORWARDED']))
        $ipaddress = $_SERVER['HTTP_FORWARDED'];
    else if (isset($_SERVER['REMOTE_ADDR']))
        $ipaddress = $_SERVER['REMOTE_ADDR'];
    else
        $ipaddress = 'UNKNOWN';
    return $ipaddress;
}

Does anyone have any clue why this might be? I'm totally at a loss.

EDIT: the map files are NOT in my network activity in dev tools and served as application/javascript

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda